Esempio n. 1
0
 public static void Set <T>(this ContainerExtensionPoint container, string key, Func <T> factory, T value)
 {
     if (container.ContentType == ContentType.Source)
     {
         GetSource(container.ExtendedValue, key, factory).Value = value;
     }
     else
     {
         GetValue(container.ExtendedValue, key, factory).Set(value);
     }
 }
Esempio n. 2
0
 public static T Get <T>(this ContainerExtensionPoint container, string key)
 {
     return(container.ContentType == ContentType.Source
                ? GetSource <T>(container.ExtendedValue, key).Value
                : GetValue <T>(container.ExtendedValue, key).Get());
 }