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."); } }
public static string GetNameAttributeUrlEncoded(dynamic obj) { return(WebUtility.UrlEncode(InfobloxSDKExtensionMethods.GetNameAttribute(obj))); }