Example #1
0
        void IBinaryXmlElement.Read(BinaryXmlReader reader)
        {
            id              = reader.ReadStringValue("id");
            ns              = reader.ReadStringValue("ns");
            isroot          = reader.ReadBooleanValue("isroot");
            name            = reader.ReadStringValue("name");
            version         = reader.ReadStringValue("version");
            compatVersion   = reader.ReadStringValue("compatVersion");
            hasUserId       = reader.ReadBooleanValue("hasUserId");
            author          = reader.ReadStringValue("author");
            url             = reader.ReadStringValue("url");
            copyright       = reader.ReadStringValue("copyright");
            description     = reader.ReadStringValue("description");
            category        = reader.ReadStringValue("category");
            basePath        = reader.ReadStringValue("basePath");
            sourceAddinFile = reader.ReadStringValue("sourceAddinFile");
            defaultEnabled  = reader.ReadBooleanValue("defaultEnabled");
            domain          = reader.ReadStringValue("domain");
            mainModule      = (ModuleDescription)reader.ReadValue("MainModule");
            optionalModules = (ModuleCollection)reader.ReadValue("OptionalModules", new ModuleCollection(this));
            nodeSets        = (ExtensionNodeSetCollection)reader.ReadValue("NodeSets", new ExtensionNodeSetCollection(this));
            extensionPoints = (ExtensionPointCollection)reader.ReadValue("ExtensionPoints", new ExtensionPointCollection(this));
            conditionTypes  = (ConditionTypeDescriptionCollection)reader.ReadValue("ConditionTypes", new ConditionTypeDescriptionCollection(this));
            fileInfo        = (object[])reader.ReadValue("FilesInfo", null);
            localizer       = (ExtensionNodeDescription)reader.ReadValue("Localizer");
            flags           = (AddinFlags)reader.ReadInt32Value("flags");
            properties      = (AddinPropertyCollectionImpl)reader.ReadValue("Properties", new AddinPropertyCollectionImpl());

            if (mainModule != null)
            {
                mainModule.SetParent(this);
            }
        }
Example #2
0
        void TransferCoreProperties(bool removeProperties)
        {
            if (properties == null)
            {
                return;
            }

            string val = properties.ExtractCoreProperty("Id", removeProperties);

            if (val != null)
            {
                id = val;
            }

            val = properties.ExtractCoreProperty("Namespace", removeProperties);
            if (val != null)
            {
                ns = val;
            }

            val = properties.ExtractCoreProperty("Version", removeProperties);
            if (val != null)
            {
                version = val;
            }

            val = properties.ExtractCoreProperty("CompatVersion", removeProperties);
            if (val != null)
            {
                compatVersion = val;
            }

            val = properties.ExtractCoreProperty("DefaultEnabled", removeProperties);
            if (val != null)
            {
                defaultEnabled = GetBool(val, true);
            }

            val = properties.ExtractCoreProperty("IsRoot", removeProperties);
            if (val != null)
            {
                isroot = GetBool(val, true);
            }

            val = properties.ExtractCoreProperty("Flags", removeProperties);
            if (val != null)
            {
                flags = (AddinFlags)Enum.Parse(typeof(AddinFlags), val);
            }
        }
Example #3
0
        void IBinaryXmlElement.Read(BinaryXmlReader reader)
        {
            id = reader.ReadStringValue ("id");
            ns = reader.ReadStringValue ("ns");
            isroot = reader.ReadBooleanValue ("isroot");
            name = reader.ReadStringValue ("name");
            version = reader.ReadStringValue ("version");
            compatVersion = reader.ReadStringValue ("compatVersion");
            hasUserId = reader.ReadBooleanValue ("hasUserId");
            author = reader.ReadStringValue ("author");
            url = reader.ReadStringValue ("url");
            copyright = reader.ReadStringValue ("copyright");
            description = reader.ReadStringValue ("description");
            category = reader.ReadStringValue ("category");
            basePath = reader.ReadStringValue ("basePath");
            sourceAddinFile = reader.ReadStringValue ("sourceAddinFile");
            defaultEnabled = reader.ReadBooleanValue ("defaultEnabled");
            domain = reader.ReadStringValue ("domain");
            mainModule = (ModuleDescription) reader.ReadValue ("MainModule");
            optionalModules = (ModuleCollection) reader.ReadValue ("OptionalModules", new ModuleCollection (this));
            nodeSets = (ExtensionNodeSetCollection) reader.ReadValue ("NodeSets", new ExtensionNodeSetCollection (this));
            extensionPoints = (ExtensionPointCollection) reader.ReadValue ("ExtensionPoints", new ExtensionPointCollection (this));
            conditionTypes = (ConditionTypeDescriptionCollection) reader.ReadValue ("ConditionTypes", new ConditionTypeDescriptionCollection (this));
            fileInfo = (object[]) reader.ReadValue ("FilesInfo", null);
            localizer = (ExtensionNodeDescription) reader.ReadValue ("Localizer");
            flags = (AddinFlags) reader.ReadInt32Value ("flags");
            properties = (AddinPropertyCollectionImpl) reader.ReadValue ("Properties", new AddinPropertyCollectionImpl (this));

            if (mainModule != null)
                mainModule.SetParent (this);
        }
Example #4
0
        void TransferCoreProperties(bool removeProperties)
        {
            if (properties == null)
                return;

            string val = properties.ExtractCoreProperty ("Id", removeProperties);
            if (val != null)
                id = val;

            val = properties.ExtractCoreProperty ("Namespace", removeProperties);
            if (val != null)
                ns = val;

            val = properties.ExtractCoreProperty ("Version", removeProperties);
            if (val != null)
                version = val;

            val = properties.ExtractCoreProperty ("CompatVersion", removeProperties);
            if (val != null)
                compatVersion = val;

            val = properties.ExtractCoreProperty ("DefaultEnabled", removeProperties);
            if (val != null)
                defaultEnabled = GetBool (val, true);

            val = properties.ExtractCoreProperty ("IsRoot", removeProperties);
            if (val != null)
                isroot = GetBool (val, true);

            val = properties.ExtractCoreProperty ("Flags", removeProperties);
            if (val != null)
                flags = (AddinFlags) Enum.Parse (typeof(AddinFlags), val);
        }
		/// <summary>
		/// Initializes the attribute
		/// </summary>
		/// <param name="flags">
		/// Add-in flags
		/// </param>
		public AddinFlagsAttribute (AddinFlags flags)
		{
			this.Flags = flags;
		}
Example #6
0
 /// <summary>
 /// Initializes the attribute
 /// </summary>
 /// <param name="flags">
 /// Add-in flags
 /// </param>
 public AddinFlagsAttribute(AddinFlags flags)
 {
     this.Flags = flags;
 }