locked
how to get all available process parameter in a build definition RRS feed

  • Question

  • I need to get  all the process parameter for a build definition

    If i use the DeserializeProcessParameter in workflowHelper class , i am getting only the parameter which has values but not all

    parameters

    please tell me how to get all....


    -samuth
    Monday, March 7, 2011 6:52 AM

Answers

  • Sounds like you might want to get the complete Metadata.  Can you use BuildDefinition.Process.Parameters, example:

        static List<DynamicActivityProperty> GetPropertyMetadata(IBuildDefinition buildDefinition)
        {
          StringReader sr = new StringReader(buildDefinition.Process.Parameters);
          DynamicActivity activity = System.Activities.XamlIntegration.ActivityXamlServices.Load(sr)
            as DynamicActivity;
    
          var propertyQuery = from dap in activity.Properties select dap;
          return propertyQuery.ToList<DynamicActivityProperty>();
    
        }
    
    
    Monday, March 7, 2011 5:45 PM

All replies

  • Sounds like you might want to get the complete Metadata.  Can you use BuildDefinition.Process.Parameters, example:

        static List<DynamicActivityProperty> GetPropertyMetadata(IBuildDefinition buildDefinition)
        {
          StringReader sr = new StringReader(buildDefinition.Process.Parameters);
          DynamicActivity activity = System.Activities.XamlIntegration.ActivityXamlServices.Load(sr)
            as DynamicActivity;
    
          var propertyQuery = from dap in activity.Properties select dap;
          return propertyQuery.ToList<DynamicActivityProperty>();
    
        }
    
    
    Monday, March 7, 2011 5:45 PM
  • Hi Samuth,

     

    Thanks for your post.

     

    For this issue, Mike provided us the helpful method, have you took it?


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, March 8, 2011 10:31 AM
    Moderator