Exemplo n.º 1
0
 public virtual bool TryDestroyInstance(IDimcupInstance <TDef> instance)
 {
     if (!_instances.ContainsKey(instance.InstanceId))
     {
         return(false);
     }
     _instances.Remove(instance.InstanceId);
     return(true);
 }
Exemplo n.º 2
0
 public bool TryUnAssignFromInstance(IDimcupInstance <TDef> instance)
 {
     if (this.UsingInstance.InstanceId == instance.InstanceId)
     {
         this.UsingInstance = null;
         return(true);
     }
     return(false);
 }
Exemplo n.º 3
0
 public virtual bool TryRegisterNewInstance(IDimcupInstance <TDef> instance)
 {
     if (_instances.ContainsKey(instance.InstanceId))
     {
         return(false);
     }
     else
     {
         _instances.Add(instance.InstanceId, instance);
         return(instance.TrySetManager(this));
     }
 }
Exemplo n.º 4
0
 public virtual bool TryUnregisterInstance(IDimcupInstance <TDef> instance)
 {
     if (!_providedInstances.ContainsKey(instance.InstanceId))
     {
         return(false);
     }
     else
     {
         _providedInstances.Remove(instance.InstanceId);
         return(true);
     }
 }
Exemplo n.º 5
0
 public override bool TryTransferInstance(IDimcupInstance <TDef> instance)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 6
0
 public override void InformOfInstanceChange(IDimcupInstance <TDef> instance)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 7
0
 public abstract void InformOfInstanceChange(IDimcupInstance <TDef> instance);
Exemplo n.º 8
0
 public abstract bool TryTransferInstance(IDimcupInstance <TDef> instance);
Exemplo n.º 9
0
 public bool TryAssignToInstance(IDimcupInstance <TDef> instance)
 {
     this.UsingInstance = instance;
     return(true);
 }