public static void Set <T>(long id, IValueInterface <T> valueInterface) { if (!(ValueInterface <T> .Content is Impl <T>)) { Impl <T> .DefaultInterface = ValueInterface <T> .Content; ValueInterface <T> .SetInterface(Impl <T> .Instance); } Impl <T> .Instance.Set(id, valueInterface); }
public static void Set <T>(ITargetedBind targeted, IValueInterface <T> valueInterface) { if (valueInterface is null) { throw new ArgumentNullException(nameof(valueInterface)); } lock (targeted) { targeted.MakeTargetedId(); } if (!(ValueInterface <T> .Content is Impl <T>)) { Impl <T> .DefaultInterface = ValueInterface <T> .Content; ValueInterface <T> .SetInterface(Impl <T> .Instance); } Impl <T> .Instance.Set(targeted, valueInterface); }