示例#1
0
        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;
        }
示例#2
0
        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;
        }
示例#3
0
        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;
        }