Ejemplo n.º 1
0
 public void UnregisterGenericChild(IMethodParent parent)
 {
     lock (syncObject)
     {
         if (this.genericChildCache == null || this.disposing)
         {
             return;
         }
         TMethod toDispose;
         if (genericChildCache.TryGetValue(parent, out toDispose))
         {
             toDispose.Dispose();
             genericChildCache.Remove(parent);
         }
     }
 }
Ejemplo n.º 2
0
 public void RegisterGenericChild(IMethodParent parent, IMethodMember genericChild)
 {
     lock (syncObject)
     {
         if (this.disposing)
         {
             return;
         }
         if (!(genericChild is TMethod))
         {
             throw new ArgumentException(ThrowHelper.GetExceptionMessage(ExceptionMessageId.ValueIsWrongType, "genericChild", genericChild.GetType().FullName, typeof(TMethod).FullName), "genericChild");
         }
         if (this.genericChildCache == null)
         {
             this.genericChildCache = new Dictionary <IMethodParent, TMethod>();
         }
         if (!genericChildCache.ContainsKey(parent))
         {
             genericChildCache.Add(parent, (TMethod)genericChild);
         }
     }
 }
Ejemplo n.º 3
0
 public void UnregisterGenericChild(IMethodParent parent)
 {
     throw new NotSupportedException();
 }
Ejemplo n.º 4
0
 public void RegisterGenericChild(IMethodParent parent, IMethodMember genericChild)
 {
     throw new NotSupportedException();
 }
Ejemplo n.º 5
0
 public void UnregisterGenericChild(IMethodParent parent)
 {
     this.CheckGenericCache();
     this.genericCache.UnregisterGenericChild(parent);
 }
Ejemplo n.º 6
0
 public void RegisterGenericChild(IMethodParent parent, IMethodMember genericChild)
 {
     this.CheckGenericCache();
     this.genericCache.RegisterGenericChild(parent, genericChild);
 }