public bool TryAddMember(DefintionLifetime defintionLifetime, IKey key, IBox <IIsPossibly <WeakMemberDefinition> > definition) { if (finalizableScope.IsFinal) { throw new ApplicationException("bug: don't add after finalize"); } var list = members.GetOrAdd(key, new ConcurrentSet <Tuple <DefintionLifetime, IBox <IIsPossibly <WeakMemberDefinition> > > >()); return(list.TryAdd(new Tuple <DefintionLifetime, IBox <IIsPossibly <WeakMemberDefinition> > >(defintionLifetime, definition))); }
public Visiblity(DefintionLifetime defintionLifeTime, TReferanced definition) { DefintionLifeTime = defintionLifeTime; Definition = definition ?? throw new ArgumentNullException(nameof(definition)); }