private CimMofDeserializer() { MI_Deserializer tmpHandle; MI_Result result = CimApplication.Handle.NewDeserializer(MI_SerializerFlags.None, MI_SerializationFormat.MOF, out tmpHandle); CimException.ThrowIfMiResultFailure(result); this._myHandle = tmpHandle; this.SchemaValidationOption = MofDeserializerSchemaValidationOption.Default; }
public NativeDeserializerTestsBase(string format) : base() { this.format = format; var application = StaticFixtures.Application; MI_Deserializer newDeserializer = null; MI_Result res = application.NewDeserializer(MI_SerializerFlags.None, format, out newDeserializer); MIAssert.Succeeded(res); Assert.NotNull(newDeserializer, "Expect newly created deserializer to be non-null"); this.Deserializer = newDeserializer; }
private CimDeserializer(string format, uint flags) { Debug.Assert(!string.IsNullOrEmpty(format), "Caller should verify that format != null"); MI_Deserializer tmpHandle; // TODO: Fix MI_SerializerFlags in next line to come from "flags" MI_Result result = CimApplication.Handle.NewDeserializer(MI_SerializerFlags.None, format, out tmpHandle); if (result == MI_Result.MI_RESULT_INVALID_PARAMETER) { throw new ArgumentOutOfRangeException("format"); } CimException.ThrowIfMiResultFailure(result); this._myHandle = tmpHandle; }