protected WdxPropertyProvider(Microsoft.Win32.SafeHandles.SafeLibraryHandle libHandle, string libPath) : base(libHandle)
 {
     Version version;
     this.PropertyFieldMap = new Dictionary<int, Tuple<int, int>>();
     IntPtr procAddress = Windows.GetProcAddress(libHandle, "ContentSetDefaultParams");
     if (procAddress != IntPtr.Zero)
     {
         ContentDefaultParamStruct struct2;
         ContentSetDefaultParamsHandler delegateForFunctionPointer = (ContentSetDefaultParamsHandler) Marshal.GetDelegateForFunctionPointer(procAddress, typeof(ContentSetDefaultParamsHandler));
         struct2 = new ContentDefaultParamStruct {
             size = Marshal.SizeOf(struct2),
             PluginInterfaceVersionHi = 2,
             PluginInterfaceVersionLow = 0,
             DefaultIniName = DefaultIniName
         };
         delegateForFunctionPointer(ref struct2);
     }
     if (VersionHelper.TryParse(FileVersionInfo.GetVersionInfo(libPath).FileVersion, VersionStyles.Any, out version))
     {
         TypeDescriptor.AddAttributes(this, new Attribute[] { new VersionAttribute(version) });
     }
     string path = Path.ChangeExtension(libPath, ".lng");
     if (File.Exists(path))
     {
         this.Resources = new LngResourceManager(path);
     }
     this.Register(Path.GetFileName(libPath));
 }
 private void Write60_ContentDefaultParamStruct(string n, string ns, ContentDefaultParamStruct o, bool needType)
 {
     if (!needType && (o.GetType() != typeof(ContentDefaultParamStruct)))
     {
         throw base.CreateUnknownTypeException(o);
     }
     base.WriteStartElement(n, ns, o, false, null);
     if (needType)
     {
         base.WriteXsiType("ContentDefaultParamStruct", "");
     }
     base.WriteElementStringRaw("size", "", XmlConvert.ToString(o.size));
     base.WriteElementStringRaw("PluginInterfaceVersionLow", "", XmlConvert.ToString(o.PluginInterfaceVersionLow));
     base.WriteElementStringRaw("PluginInterfaceVersionHi", "", XmlConvert.ToString(o.PluginInterfaceVersionHi));
     base.WriteElementString("DefaultIniName", "", o.DefaultIniName);
     base.WriteEndElement(o);
 }