public virtual bool TryDestroyInstance(IDimcupInstance <TDef> instance) { if (!_instances.ContainsKey(instance.InstanceId)) { return(false); } _instances.Remove(instance.InstanceId); return(true); }
public bool TryUnAssignFromInstance(IDimcupInstance <TDef> instance) { if (this.UsingInstance.InstanceId == instance.InstanceId) { this.UsingInstance = null; return(true); } return(false); }
public virtual bool TryRegisterNewInstance(IDimcupInstance <TDef> instance) { if (_instances.ContainsKey(instance.InstanceId)) { return(false); } else { _instances.Add(instance.InstanceId, instance); return(instance.TrySetManager(this)); } }
public virtual bool TryUnregisterInstance(IDimcupInstance <TDef> instance) { if (!_providedInstances.ContainsKey(instance.InstanceId)) { return(false); } else { _providedInstances.Remove(instance.InstanceId); return(true); } }
public override bool TryTransferInstance(IDimcupInstance <TDef> instance) { throw new NotImplementedException(); }
public override void InformOfInstanceChange(IDimcupInstance <TDef> instance) { throw new NotImplementedException(); }
public abstract void InformOfInstanceChange(IDimcupInstance <TDef> instance);
public abstract bool TryTransferInstance(IDimcupInstance <TDef> instance);
public bool TryAssignToInstance(IDimcupInstance <TDef> instance) { this.UsingInstance = instance; return(true); }