none
how to get all available process parameter in a build definition

    Domanda

  • 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
    lunedì 7 marzo 2011 06:52

Risposte

  • 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>();
    
        }
    
    
    lunedì 7 marzo 2011 17:45

Tutte le risposte

  • 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>();
    
        }
    
    
    lunedì 7 marzo 2011 17:45
  • 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.

    martedì 8 marzo 2011 10:31
    Moderatore