protected Record getObjectRule(string key) { if (string.IsNullOrEmpty(key)) { return(null); } /*System.Net.ServicePointManager.ServerCertificateValidationCallback += * (se, cert, chain, sslerror) => * { * return true; * }; */ StreamApi streamApi = new StreamApi(session.GetApiClient()); StreamOptionsRecord optionsRecord = new StreamOptionsRecord(); optionsRecord.ObjectKey = key; CheckRuleResult result = streamApi.CheckRule(optionsRecord.ToJson(), null, null); if (result.Hdr.Rc == 0) { return(result.Stream); } else { return(null); } }
/// <summary> /// Initializes a new instance of the <see cref="SetActionNewTimeForListInput" /> class. /// </summary> /// <param name="OptionsV2">OptionsV2 (required).</param> /// <param name="Options">Options (required).</param> public SetActionNewTimeForListInput(StreamOptionsV2Record OptionsV2 = null, StreamOptionsRecord Options = null) { // to ensure "OptionsV2" is required (not null) if (OptionsV2 == null) { throw new InvalidDataException("OptionsV2 is a required property for SetActionNewTimeForListInput and cannot be null"); } else { this.OptionsV2 = OptionsV2; } // to ensure "Options" is required (not null) if (Options == null) { throw new InvalidDataException("Options is a required property for SetActionNewTimeForListInput and cannot be null"); } else { this.Options = Options; } }