// // Copyright 2014-2015 Amazon.com, // Inc. or its affiliates. All Rights Reserved. // // SPDX-License-Identifier: Apache-2.0 // using System; using Amazon.Runtime; namespace Amazon.CognitoSync.SyncManager { /// /// Callback for asynchronous Sync Manager operations /// /// A response object type /// Result public delegate void AmazonCognitoSyncCallback(AmazonCognitoSyncResult result); /// /// Callback for asynchronous Sync Manager operations /// /// Result public delegate void AmazonCognitoSyncCallback(AmazonCognitoSyncResult result); /// /// A result object passed back in the callback. /// /// A response object type public class AmazonCognitoSyncResult { /// /// A response object. /// public TResponse Response { get; internal set; } /// /// The exception that occured /// public Exception Exception { get; internal set; } /// /// A user defined state passed back from callback /// public object State { get; internal set; } /// /// Constructor /// /// A user defined state passed back from callback public AmazonCognitoSyncResult(object state) { this.State = state; } /// /// Constructor /// /// A response object /// The exception that occured /// A user defined state passed back from callback public AmazonCognitoSyncResult(TResponse response, Exception exception, object state) { this.Response = response; this.Exception = exception; this.State = state; } } /// /// A result object passed back in the callback. /// public class AmazonCognitoSyncResult { /// /// The exception that occured /// public Exception Exception { get; internal set; } /// /// A user defined state passed back from callback /// public object State { get; internal set; } /// /// Constructor /// /// A user defined state passed back from callback public AmazonCognitoSyncResult(object state) { this.State = state; } /// /// Constructor /// /// The exception that occured /// A user defined state passed back from callback public AmazonCognitoSyncResult(Exception exception, object state) { this.Exception = exception; this.State = state; } } }