Ejemplo n.º 1
0
        protected void RemoveInstanceCore <TInstance>(string extName)
        {
            var cell = StateStack.FirstOrDefault(p => p.InstanceType == typeof(TInstance) && p.ExtName == extName);

            if (cell != null)
            {
                StateStack.Remove(cell);
            }
        }
Ejemplo n.º 2
0
        protected void SetInstanceCore <TInstance>(TInstance instance, string extName)
        {
            var cell = StateStack.FirstOrDefault(p => p.InstanceType == typeof(TInstance) && p.ExtName == extName);

            if (cell != null)
            {
                cell.Instance = instance;
            }
            else
            {
                StateStack.Add(new InstanceCell {
                    Instance     = instance,
                    ExtName      = extName,
                    InstanceType = typeof(TInstance)
                });
            }
        }