예제 #1
0
        private static void callbackCaller(Dictionary <string, object> response, string callerId)
        {
            IDelegator delegator = null;

            try
            {
                Jsonable.CheckForErrors(response);

                lock (AmazonMobileAdsImpl.callbackLock)
                {
                    delegator = AmazonMobileAdsImpl.callbackDictionary[callerId];
                    AmazonMobileAdsImpl.callbackDictionary.Remove(callerId);

                    delegator.ExecuteSuccess(response);
                }
            }
            catch (AmazonException e)
            {
                lock (AmazonMobileAdsImpl.callbackLock)
                {
                    if (delegator == null)
                    {
                        delegator = AmazonMobileAdsImpl.callbackDictionary[callerId];
                    }
                    AmazonMobileAdsImpl.callbackDictionary.Remove(callerId);

                    delegator.ExecuteError(e);
                }
            }
        }
예제 #2
0
        public CollectionNodeHandler(object obj, IDelegator delegator)
        {
            this._obj  = obj;
            _delegator = delegator;

            Type collectionBase = CollectionTools.GetCollectionBase(obj.GetType());

            _elementType     = CollectionTools.GetCollectionElementType(collectionBase);
            _addMethod       = collectionBase.GetMethod("Add");
            _elementTypeName = delegator.CreateName(_elementType);
        }
예제 #3
0
 public MemberNodeHandler(object obj, IDelegator delegator)
 {
     _instance  = obj;
     _delegator = delegator;
 }
예제 #4
0
 public MemberNodeHandlerFactory(IDelegator delegator)
 {
     _delegator = delegator;
 }
예제 #5
0
 public ConstructorCaller(IDelegator delegator)
 {
     _delegator = delegator;
 }
예제 #6
0
 public ArrayValueDeserializer(IDelegator delegator)
 {
     _delegator = delegator;
 }
예제 #7
0
 public ContextNodeDeserializer(IEnumerable <INodeHandlerFactory> handlerFactories, IDelegator delegator)
 {
     _handlerFactory = handlerFactories;
     _caller         = new ConstructorCaller(delegator);
 }
예제 #8
0
 public Producer(IDelegator delegator)
 {
     this.delegator = delegator;
 }
예제 #9
0
 public CollectionNodeHandlerFactory(IDelegator delegator)
 {
     _delegator = delegator;
 }
예제 #10
0
파일: EventSink.cs 프로젝트: xafero/Neato
 public EventSink(Application app, IDelegator delegator)
 {
     app.Activated += app_Activated;
     this.delegator = delegator;
 }
예제 #11
0
 public CollectionValueDeserializer(IDelegator delegator)
 {
     _delegator = delegator;
 }