Aspose.Tasks.Examples.CSharp.WorkingWithFormulas.CalculateMathExpressions.CreateTestProjectWithCustomField C# (CSharp) Метод

CreateTestProjectWithCustomField() публичный статический Метод

public static CreateTestProjectWithCustomField ( ) : Project
Результат Project
        public static Project CreateTestProjectWithCustomField()
        {
            Project project = new Project();
            ExtendedAttributeDefinition attr = new ExtendedAttributeDefinition();          
            attr.FieldId = ExtendedAttributeTask.Text1.ToString("D");
            attr.Alias = "Sine";
            project.ExtendedAttributes.Add(attr);

            Task task = project.RootTask.Children.Add("Task");

            ExtendedAttribute a = attr.CreateExtendedAttribute();
            task.ExtendedAttributes.Add(a);
            return project;
        }
        // ExEnd:CalculateMathExpressions