Exemplo n.º 1
0
 private static void MapExtensionProperties(IAttributeSetInstanceStateDto state, JObject dynamicObject, IDictionary <string, string> propertyFieldDictionary, string nameFormat)
 {
     foreach (var p in propertyFieldDictionary)
     {
         var propertyName = (nameFormat == null) ? p.Key : String.Format(nameFormat, p.Key);
         var fieldName    = (nameFormat == null) ? p.Value : String.Format(nameFormat, p.Value);
         var pVal         = Dynamic.InvokeGet(state, fieldName);
         if (pVal != null)
         {
             Dynamic.InvokeSet(dynamicObject, propertyName, pVal);
         }
     }
 }
Exemplo n.º 2
0
        protected override void MapExtensionProperties(IAttributeSetInstanceStateDto state, JObject dynamicObject)
        {
            var pDic = AttributeSetService.GetExtensionPropertyFieldDictionary(state.AttributeSetId);

            MapExtensionProperties(state, dynamicObject, pDic, null);
        }