BuildingCoder.CmdProjectParameterGuids.PopulateProjectParameterData C# (CSharp) Method

PopulateProjectParameterData() static private method

This method populates the appropriate values on a ProjectParameterData object with information from the given Parameter object.
static private PopulateProjectParameterData ( Parameter parameter, ProjectParameterData projectParameterDataToFill ) : void
parameter Parameter The Parameter object with source information
projectParameterDataToFill ProjectParameterData The ProjectParameterData object to fill
return void
        static void PopulateProjectParameterData(
            Parameter parameter,
            ProjectParameterData projectParameterDataToFill)
        {
            // Following good SOA practices, validate incoming parameters first.

              if( parameter == null )
              {
            throw new ArgumentNullException( "parameter" );
              }

              if( projectParameterDataToFill == null )
              {
            throw new ArgumentNullException(
              "projectParameterDataToFill" );
              }

              projectParameterDataToFill.IsSharedStatusKnown = true;
              projectParameterDataToFill.IsShared = parameter.IsShared;
              if( parameter.IsShared )
              {
            if( parameter.GUID != null )
            {
              projectParameterDataToFill.GUID = parameter.GUID.ToString();
            }
              }
        }