예제 #1
0
 public async Task <string> NewIbxObject(dynamic ibxObject)
 {
     if (ibxObject != null)
     {
         if (InfobloxSDKExtensionMethods.IsInfobloxType(ibxObject.GetType()))
         {
             return(await this.PostAsync(InfobloxSDKExtensionMethods.GetNameAttribute(ibxObject), InfobloxSDKExtensionMethods.PrepareObjectForSend(ibxObject, true)));
         }
         else
         {
             throw new ArgumentException($"The type must be a valid infoblox object type, {ibxObject.GetType().FullName} was provided.");
         }
     }
     else
     {
         throw new ArgumentNullException("ibxObject", "The ibxObject parameter cannot be null.");
     }
 }
예제 #2
0
 public static string GetNameAttributeUrlEncoded(dynamic obj)
 {
     return(WebUtility.UrlEncode(InfobloxSDKExtensionMethods.GetNameAttribute(obj)));
 }