Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="objectExtension"></param>
        /// <param name="type"></param>
        /// <param name="name"></param>
        public ObjectExtensionPropertyInfo(
            ObjectExtensionInfo objectExtension,
            Type type,
            string name)
        {
            ObjectExtension = Check.NotNull(objectExtension, nameof(objectExtension));
            Type            = Check.NotNull(type, nameof(type));
            Name            = Check.NotNull(name, nameof(name));

            Configuration = new Dictionary <object, object>();
            Attributes    = new List <Attribute>();

            Attributes.AddRange(ExtensionPropertyHelper.GetDefaultAttributes(Type));
            DefaultValue = TypeHelper.GetDefaultValue(Type);
        }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public object GetDefaultValue()
 {
     return(ExtensionPropertyHelper.GetDefaultValue(Type, DefaultValueFactory, DefaultValue));
 }