WoopsaJsonData() public static method

public static WoopsaJsonData ( string jsonData ) : WoopsaValue
jsonData string
return WoopsaValue
        protected virtual void PopulateProperties(object targetObject, Type exposedType,
                                                  IEnumerable <PropertyDescription> properties)
        {
            HashSet <string> addedElements = new HashSet <string>();

            foreach (var property in properties)
            {
                if (IsMemberWoopsaVisible(targetObject, property.PropertyInfo))
                {
                    if (!addedElements.Contains(property.Name))
                    {
                        AddWoopsaProperty(property);
                        addedElements.Add(property.Name);
                    }
                }
            }
            if (typeof(IEnumerable <object>).IsAssignableFrom(exposedType) && Visibility.HasFlag(WoopsaVisibility.IEnumerableObject))
            {
                new WoopsaProperty(this, nameof(OrderedItemIds), WoopsaValueType.JsonData,
                                   (p) => WoopsaValue.WoopsaJsonData(OrderedItemIds));
            }
        }
示例#2
0
 public void ExecuteMultiRequest(WoopsaClientMultiRequest multiRequest)
 {
     if (multiRequest.Count > 0)
     {
         multiRequest.Reset();
         if (!_disableRemoteMultiRequest)
         {
             try
             {
                 WoopsaValue results = _remoteMethodMultiRequest.Invoke(
                     WoopsaValue.WoopsaJsonData(multiRequest.Requests.Serialize()));
                 multiRequest.DispatchResults(results.JsonData);
             }
             catch (WoopsaNotFoundException)
             {
                 _disableRemoteMultiRequest = true;
             }
         }
         if (_disableRemoteMultiRequest)
         {
             ExecuteMultiRequestLocally(multiRequest);
         }
     }
 }