Exemple #1
0
        private LocalBuilder BuildContentContainer(IContentContainer container, ILGenerator il)
        {
            //instantiate an object of the .Content's type
            var contentLocalVar = Reconstruct(container.Content, il);

            //instaniate an object of the content container
            var contType = container.GetType();
            var contBldr = Construct(contType, il);

            //set contentHost.Content = val;
            SetContent(contBldr, contentLocalVar, il);

            return(contBldr);
        }
Exemple #2
0
 /// <summary>
 /// Construct an ItemId by extracting it from a container
 /// </summary>
 /// <param name="coll">The collator from the system for which we are determining the itemid</param>
 /// <param name="container">The container</param>
 public ItemId(Collator coll, IContentContainer container)
     : this(Collator.GetContentType(container), coll.GetIdProperty(container.GetType().UnproxiedType()).GetValue(container))
 {
 }
Exemple #3
0
 /// <summary>
 /// Construct an ItemId by extracting it from a container, using the primary Lynicon system for this
 /// </summary>
 /// <param name="container">The container</param>
 public ItemId(IContentContainer container)
     : this(Collator.GetContentType(container), Collator.Instance.GetIdProperty(container.GetType().UnproxiedType()).GetValue(container))
 {
 }