Exemplo n.º 1
0
 public virtual void RemoveEntityExtension(System.Type specType, Net.Vpc.Upa.Extensions.EntityExtensionDefinition specObject)
 {
     objectMap.Remove(specObject);
     System.Collections.Generic.IList <Net.Vpc.Upa.Impl.ExtensionSupportInfo> list = Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <System.Type, System.Collections.Generic.IList <Net.Vpc.Upa.Impl.ExtensionSupportInfo> >(extensionsMap, specType);
     if (list != null)
     {
         for (int i = (list).Count; i >= 0; i--)
         {
             Net.Vpc.Upa.Impl.ExtensionSupportInfo tss = list[i];
             if (tss.GetExtension().Equals(specObject))
             {
                 list.RemoveAt(i);
             }
         }
     }
     foreach (System.Collections.Generic.KeyValuePair <System.Type, System.Collections.Generic.IList <Net.Vpc.Upa.Impl.ExtensionSupportInfo> > e in new System.Collections.Generic.HashSet <System.Collections.Generic.KeyValuePair <System.Type, System.Collections.Generic.IList <Net.Vpc.Upa.Impl.ExtensionSupportInfo> > >(new System.Collections.Generic.Dictionary <System.Type, System.Collections.Generic.IList <Net.Vpc.Upa.Impl.ExtensionSupportInfo> >(extensionsSupportMap)))
     {
         System.Collections.Generic.IList <Net.Vpc.Upa.Impl.ExtensionSupportInfo> tss2 = (e).Value;
         for (int i2 = (tss2).Count; i2 >= 0; i2--)
         {
             Net.Vpc.Upa.Impl.ExtensionSupportInfo tss3 = tss2[i2];
             if (tss3.GetExtension().Equals(specObject))
             {
                 tss2.RemoveAt(i2);
             }
         }
         if ((tss2.Count == 0))
         {
             extensionsSupportMap.Remove((e).Key);
         }
     }
     for (System.Collections.Generic.IEnumerator <System.Collections.Generic.KeyValuePair <System.Type, System.Collections.Generic.IList <Net.Vpc.Upa.Impl.ExtensionSupportInfo> > > i = new System.Collections.Generic.HashSet <System.Collections.Generic.KeyValuePair <System.Type, System.Collections.Generic.IList <Net.Vpc.Upa.Impl.ExtensionSupportInfo> > >(extensionsSupportMap).GetEnumerator(); i.MoveNext();)
     {
     }
 }
Exemplo n.º 2
0
 public virtual void AddEntityExtension(System.Type specType, System.Type supportType, Net.Vpc.Upa.Extensions.EntityExtensionDefinition specObject, Net.Vpc.Upa.Persistence.EntityExtension extensionSupport)
 {
     Net.Vpc.Upa.Impl.ExtensionSupportInfo tss = new Net.Vpc.Upa.Impl.ExtensionSupportInfo(specType, specObject, extensionSupport);
     objectMap[specObject] = tss;
     System.Collections.Generic.IList <Net.Vpc.Upa.Impl.ExtensionSupportInfo> list = Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <System.Type, System.Collections.Generic.IList <Net.Vpc.Upa.Impl.ExtensionSupportInfo> >(extensionsMap, specType);
     if (list == null)
     {
         list = new System.Collections.Generic.List <Net.Vpc.Upa.Impl.ExtensionSupportInfo>();
         extensionsMap[specType] = list;
     }
     list.Add(tss);
     System.Collections.Generic.IList <Net.Vpc.Upa.Impl.ExtensionSupportInfo> list2 = Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <System.Type, System.Collections.Generic.IList <Net.Vpc.Upa.Impl.ExtensionSupportInfo> >(extensionsSupportMap, supportType);
     if (list2 == null)
     {
         list2 = new System.Collections.Generic.List <Net.Vpc.Upa.Impl.ExtensionSupportInfo>();
         extensionsSupportMap[supportType] = list2;
     }
     list2.Add(tss);
 }