Exemple #1
0
 private void GetTaskParameters(Type aType, TaskDefinitionContainer aContainer)
 {
     PropertyInfo[] lProperties = aType.GetProperties();
     foreach (PropertyInfo lProperty in lProperties)
     {
         object[] lObjects = lProperty.GetCustomAttributes(typeof(TaskParameterDefinitionAttribute), true);
         if (lObjects != null || lObjects.Length > 0)
         {
             aContainer.TaskParameterDefinitionList.Add((TaskParameterDefinitionAttribute)lObjects[0]);
         }
     }
 }
Exemple #2
0
        //     XmlNode lChildNode = lDocument.CreateNode("element", "xs:element", "");

        //     XmlAttribute lAttribute = lDocument.CreateAttribute("name");
        //     lAttribute.Value = aName;
        //     lAttribute = lDocument.CreateAttribute("type");
        //     lAttribute.Value
        //     lChildNode.Attributes.Append();
        ////    <!--<xs:element name="MySimpleProperty" type="msb:StringPropertyType" substitutionGroup="msb:Property"/>-->
        //   // <!--<xs:element name="MyItem" substitutionGroup="msb:Item">
        //       // <xs:annotation>
        //       //    <xs:documentation><!-- _locID_text="Reference" _locComment="" -->Reference to an assembly</xs:documentation>
        //       //</xs:annotation>
        //  //    <xs:complexType>
        //   //        <xs:complexContent>
        //   //            <xs:extension base="msb:SimpleItemType">
        //   //                <xs:sequence maxOccurs="1">
        //   //                    <xs:choice>
        //   //                        <xs:element name="MyMetadata" type="xs:string"/>
        //   //                    </xs:choice>
        //   //                </xs:sequence>
        //   //            </xs:extension>
        //   //        </xs:complexContent>
        //   //    </xs:complexType>
        //   //</xs:element>-->
        //<xs:element name="AL" substitutionGroup="msb:Task">
        //   <xs:complexType>
        //       <xs:complexContent>
        //           <xs:extension base="msb:TaskType">
        //               <xs:attribute name="AlgorithmId" />
        //               <xs:attribute name="BaseAddress" />
        //               <xs:attribute name="CompanyName" />
        //                 <xs:attribute name="GenerateFullPaths" type="msb:boolean" />
        //               <xs:attribute name="KeyContainer" />
        //               <xs:attribute name="KeyFile" />
        //               <xs:attribute name="LinkResources" />
        //               <xs:attribute name="MainEntryPoint" />
        //               <xs:attribute name="OutputAssembly" use="required" />



        //   }

        public void GetMSBuildTasks(Type[] aTypeArray, TaskDefinitionList aTaskList)
        {
            foreach (Type lType in aTypeArray)
            {
                if (lType.IsClass)
                {
                    object[] lObjects = lType.GetCustomAttributes(typeof(TaskDefinitionAttribute), true);
                    if (lObjects != null || lObjects.Length > 0)
                    {
                        TaskDefinitionContainer lContainer = new TaskDefinitionContainer((TaskDefinitionAttribute)lObjects[0]);
                        GetTaskParameters(lType, lContainer);
                        aTaskList.Add(lContainer);
                    }
                }
            }
        }
Exemple #3
0
 public void AddTaskNode(XmlNode aRootNode, TaskDefinitionContainer aTaskContainer)
 {
     throw new Exception("The method or operation is not implemented.");
 }