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); } } }
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); } } }
public void UnregisterGenericChild(IMethodParent parent) { throw new NotSupportedException(); }
public void RegisterGenericChild(IMethodParent parent, IMethodMember genericChild) { throw new NotSupportedException(); }
public void UnregisterGenericChild(IMethodParent parent) { this.CheckGenericCache(); this.genericCache.UnregisterGenericChild(parent); }
public void RegisterGenericChild(IMethodParent parent, IMethodMember genericChild) { this.CheckGenericCache(); this.genericCache.RegisterGenericChild(parent, genericChild); }