Beispiel #1
0
 public void AddMetadata(ComponentCache.ResourceEntry re)
 {
     if (this.metadata == null)
     {
         this.metadata = new List <ComponentCache.ResourceEntry>();
     }
     this.metadata.Add(re);
 }
Beispiel #2
0
 public void AddResource(ComponentCache.ResourceEntry re)
 {
     if (this.resources == null)
     {
         this.resources = new List <ComponentCache.ResourceEntry>();
     }
     this.resources.Add(re);
 }
 private void AddCacheEntry(IDesignerSerializationManager manager, string name, object value, bool isMetadata, bool forceInvariant, bool shouldSerializeValue, bool ensureInvariant)
 {
     ComponentCache.Entry entry = manager.Context[typeof(ComponentCache.Entry)] as ComponentCache.Entry;
     if (entry != null)
     {
         ComponentCache.ResourceEntry re = new ComponentCache.ResourceEntry {
             Name                 = name,
             Value                = value,
             ForceInvariant       = forceInvariant,
             ShouldSerializeValue = shouldSerializeValue,
             EnsureInvariant      = ensureInvariant,
             PropertyDescriptor   = (PropertyDescriptor)manager.Context[typeof(PropertyDescriptor)],
             ExpressionContext    = (ExpressionContext)manager.Context[typeof(ExpressionContext)]
         };
         if (isMetadata)
         {
             entry.AddMetadata(re);
         }
         else
         {
             entry.AddResource(re);
         }
     }
 }
 private void AddCacheEntry(IDesignerSerializationManager manager, string name, object value, bool isMetadata, bool forceInvariant, bool shouldSerializeValue, bool ensureInvariant)
 {
     ComponentCache.Entry entry = manager.Context[typeof(ComponentCache.Entry)] as ComponentCache.Entry;
     if (entry != null)
     {
         ComponentCache.ResourceEntry re = new ComponentCache.ResourceEntry {
             Name = name,
             Value = value,
             ForceInvariant = forceInvariant,
             ShouldSerializeValue = shouldSerializeValue,
             EnsureInvariant = ensureInvariant,
             PropertyDescriptor = (PropertyDescriptor) manager.Context[typeof(PropertyDescriptor)],
             ExpressionContext = (ExpressionContext) manager.Context[typeof(ExpressionContext)]
         };
         if (isMetadata)
         {
             entry.AddMetadata(re);
         }
         else
         {
             entry.AddResource(re);
         }
     }
 }