コード例 #1
0
 private void ParseProperties(Project project)
 {
     foreach (BuildPropertyGroup group in project.PropertyGroups)
     {
         foreach (BuildProperty msproperty in group)
         {
             // TODO: Should allow the user to toggle shwoing imported properties
             if (!msproperty.Name.StartsWith("_") && !msproperty.IsImported)
             {
                 // TODO: Should allow the user to toggle using the FinalValue on and off,
                 // because sometimes they may want to change the actual value, and sometimes
                 // the expanded value
                 MSBuildProperty property = new MSBuildProperty(msproperty.Name, msproperty.FinalValue,
                                                                group.Condition, msproperty.Condition);
                 Properties.Add(property);
             }
         }
     }
 }
コード例 #2
0
 private void ParseProperties()
 {
     foreach (ProjectProperty msproperty in _project.Properties)
     {
         // TODO: Should allow the user to toggle shwoing imported properties
         if (!msproperty.Name.StartsWith("_") && !msproperty.IsImported &&
             !msproperty.IsEnvironmentProperty && !msproperty.IsGlobalProperty &&
             !msproperty.IsReservedProperty)
         {
             // TODO: Should allow the user to toggle using the FinalValue on and off,
             // because sometimes they may want to change the actual value, and sometimes
             // the expanded value
             MSBuildProperty property = new MSBuildProperty(msproperty.Name, msproperty.EvaluatedValue,
                                                             string.Empty, string.Empty);
             Properties.Add(property);
         }
         else if (!msproperty.Name.StartsWith("_") && !msproperty.IsImported &&
             msproperty.IsReservedProperty)
         {
             MSBuildProperty property = new MSBuildProperty(msproperty.Name, msproperty.EvaluatedValue,
                                                            "Reserved", string.Empty);
             Properties.Add(property);
         }
         else if (!msproperty.Name.StartsWith("_") && !msproperty.IsImported &&
             msproperty.IsEnvironmentProperty)
         {
             MSBuildProperty property = new MSBuildProperty(msproperty.Name, msproperty.EvaluatedValue,
                                                            "Environment", string.Empty);
             Properties.Add(property);
         }
     }
 }