C# Class Microsoft.VisualStudio.Project.ConfigProvider

Inheritance: IVsCfgProvider2, IVsProjectCfgProvider, IVsExtensibleObject
Mostra file Open project: tunnelvisionlabs/MPFProj10

Public Methods

Method Description
AddCfgsOfCfgName ( string name, string cloneName, int fPrivate ) : int

Copies an existing configuration name or creates a new one.

AddCfgsOfPlatformName ( string platformName, string clonePlatformName ) : int

Copies an existing platform name or creates a new one.

AdviseCfgProviderEvents ( IVsCfgProviderEvents sink, uint &cookie ) : int

Registers the caller for configuration event notification.

ConfigProvider ( ProjectNode manager ) : System
DeleteCfgsOfCfgName ( string name ) : int

Deletes a specified configuration name.

DeleteCfgsOfPlatformName ( string platName ) : int

Deletes a specified platform name.

GetAutomationObject ( string configurationName, object &configurationProperties ) : int

Proved access to an IDispatchable object being a list of configuration properties

GetCfgNames ( uint celt, string names, uint actual ) : int

Returns the existing configurations stored in the project file.

GetCfgOfName ( string name, string platName, IVsCfg &cfg ) : int

Returns the configuration associated with a specified configuration or platform name.

GetCfgProviderProperty ( int propid, object &var ) : int

Returns a specified configuration property.

GetCfgs ( uint celt, IVsCfg a, uint actual, uint flags ) : int

Returns the per-configuration objects for this object.

GetConfigurationCondition ( string configurationName ) : string
GetConfigurationPlatformCondition ( string configurationName, string platformName ) : string
GetPlatformCondition ( string platformName ) : string
GetPlatformNameFromPlatformProperty ( string platformProperty ) : string

Helper function to convert AnyCPU to Any CPU.

GetPlatformNames ( uint celt, string names, uint actual ) : int

Returns one or more platform names.

GetPlatformPropertyFromPlatformName ( string platformName ) : string

Helper function to convert Any CPU to AnyCPU.

GetSupportedPlatformNames ( uint celt, string names, uint actual ) : int

Returns the set of platforms that are installed on the user's machine.

OpenProjectCfg ( string projectCfgCanonicalName, IVsProjectCfg &projectCfg ) : int

Provides access to the IVsProjectCfg interface implemented on a project's configuration object.

RenameCfgsOfCfgName ( string old, string newname ) : int

Assigns a new name to a configuration.

UnadviseCfgProviderEvents ( uint cookie ) : int

Cancels a registration for configuration event notification.

get_UsesIndependentConfigurations ( int &usesIndependentConfigurations ) : int

Checks whether or not this configuration provider uses independent configurations.

Protected Methods

Method Description
AddConfiguration ( Microsoft.Build.Evaluation project, string configurationName ) : int
AddConfiguration ( Microsoft.Build.Evaluation project, string configurationName, string cloneConfigurationName ) : int
AddPlatform ( Microsoft.Build.Evaluation project, string platformName ) : int
AddPlatform ( Microsoft.Build.Evaluation project, string platformName, string clonePlatformName ) : int
CloneConfiguration ( Microsoft.Build.Evaluation project, string existingConfigurationName, string newConfigurationName ) : int
ClonePlatform ( Microsoft.Build.Evaluation project, string existingPlatformName, string newPlatformName ) : int
ClonePropertyGroup ( Microsoft.Build.Evaluation project, Microsoft.Build.Construction.ProjectPropertyGroupElement group ) : Microsoft.Build.Construction.ProjectPropertyGroupElement

For internal use only. This creates a copy of an existing configuration and add it to the project. Caller should change the condition on the PropertyGroup. If derived class want to accomplish this, they should call ConfigProvider.AddCfgsOfCfgName() It is expected that in the future MSBuild will have support for this so we don't have to do it manually.

CreateProjectConfiguration ( string configName, string platform ) : ProjectConfig
DeleteConfiguration ( Microsoft.Build.Evaluation project, string configurationName ) : int
DeletePlatform ( Microsoft.Build.Evaluation project, string platformName ) : int
GetBuildProjects ( ) : IEnumerable
GetBuildProjects ( bool includeUserBuildProjects ) : IEnumerable
GetDefaultOutputPath ( string configurationName, string platformName ) : string
GetDefaultPlatforms ( ) : string[]
GetPlatforms ( uint celt, string names, uint actual, string platforms ) : int

Common method for handling platform names.

GetPlatformsFromProject ( ) : string[]

Gets all the platforms defined in the project

GetProjectConfiguration ( string configName, string platform ) : ProjectConfig

Creates new Project Configuration objects based on the configuration name.

GetPropertiesConditionedOn ( string constant ) : string[]

Get all the configurations in the project.

GetSupportedPlatformsFromProject ( ) : string[]

Return the supported platform names.

NotifyOnCfgNameAdded ( string name ) : void

Called when a new configuration name was added.

NotifyOnCfgNameDeleted ( string name ) : void

Called when a config name was deleted.

NotifyOnCfgNameRenamed ( string oldName, string newName ) : void

Called when a config name was renamed

NotifyOnPlatformNameAdded ( string platformName ) : void

Called when a platform name was added

NotifyOnPlatformNameDeleted ( string platformName ) : void

Called when a platform name was deleted

RenameConfiguration ( Microsoft.Build.Evaluation project, string oldConfigurationName, string newConfigurationName ) : int

Method Details

AddCfgsOfCfgName() public method

Copies an existing configuration name or creates a new one.
public AddCfgsOfCfgName ( string name, string cloneName, int fPrivate ) : int
name string The name of the new configuration.
cloneName string the name of the configuration to copy, or a null reference, indicating that AddCfgsOfCfgName should create a new configuration.
fPrivate int Flag indicating whether or not the new configuration is private. If fPrivate is set to true, the configuration is private. If set to false, the configuration is public. This flag can be ignored.
return int

AddCfgsOfPlatformName() public method

Copies an existing platform name or creates a new one.
public AddCfgsOfPlatformName ( string platformName, string clonePlatformName ) : int
platformName string The name of the new platform.
clonePlatformName string The name of the platform to copy, or a null reference, indicating that AddCfgsOfPlatformName should create a new platform.
return int

AddConfiguration() protected method

protected AddConfiguration ( Microsoft.Build.Evaluation project, string configurationName ) : int
project Microsoft.Build.Evaluation
configurationName string
return int

AddConfiguration() protected method

protected AddConfiguration ( Microsoft.Build.Evaluation project, string configurationName, string cloneConfigurationName ) : int
project Microsoft.Build.Evaluation
configurationName string
cloneConfigurationName string
return int

AddPlatform() protected method

protected AddPlatform ( Microsoft.Build.Evaluation project, string platformName ) : int
project Microsoft.Build.Evaluation
platformName string
return int

AddPlatform() protected method

protected AddPlatform ( Microsoft.Build.Evaluation project, string platformName, string clonePlatformName ) : int
project Microsoft.Build.Evaluation
platformName string
clonePlatformName string
return int

AdviseCfgProviderEvents() public method

Registers the caller for configuration event notification.
public AdviseCfgProviderEvents ( IVsCfgProviderEvents sink, uint &cookie ) : int
sink IVsCfgProviderEvents Reference to the IVsCfgProviderEvents interface to be called to provide notification of configuration events.
cookie uint Reference to a token representing the completed registration
return int

CloneConfiguration() protected method

protected CloneConfiguration ( Microsoft.Build.Evaluation project, string existingConfigurationName, string newConfigurationName ) : int
project Microsoft.Build.Evaluation
existingConfigurationName string
newConfigurationName string
return int

ClonePlatform() protected method

protected ClonePlatform ( Microsoft.Build.Evaluation project, string existingPlatformName, string newPlatformName ) : int
project Microsoft.Build.Evaluation
existingPlatformName string
newPlatformName string
return int

ClonePropertyGroup() protected method

For internal use only. This creates a copy of an existing configuration and add it to the project. Caller should change the condition on the PropertyGroup. If derived class want to accomplish this, they should call ConfigProvider.AddCfgsOfCfgName() It is expected that in the future MSBuild will have support for this so we don't have to do it manually.
protected ClonePropertyGroup ( Microsoft.Build.Evaluation project, Microsoft.Build.Construction.ProjectPropertyGroupElement group ) : Microsoft.Build.Construction.ProjectPropertyGroupElement
project Microsoft.Build.Evaluation
group Microsoft.Build.Construction.ProjectPropertyGroupElement PropertyGroup to clone
return Microsoft.Build.Construction.ProjectPropertyGroupElement

ConfigProvider() public method

public ConfigProvider ( ProjectNode manager ) : System
manager ProjectNode
return System

CreateProjectConfiguration() protected method

protected CreateProjectConfiguration ( string configName, string platform ) : ProjectConfig
configName string
platform string
return ProjectConfig

DeleteCfgsOfCfgName() public method

Deletes a specified configuration name.
public DeleteCfgsOfCfgName ( string name ) : int
name string The name of the configuration to be deleted.
return int

DeleteCfgsOfPlatformName() public method

Deletes a specified platform name.
public DeleteCfgsOfPlatformName ( string platName ) : int
platName string The platform name to delete.
return int

DeleteConfiguration() protected method

protected DeleteConfiguration ( Microsoft.Build.Evaluation project, string configurationName ) : int
project Microsoft.Build.Evaluation
configurationName string
return int

DeletePlatform() protected method

protected DeletePlatform ( Microsoft.Build.Evaluation project, string platformName ) : int
project Microsoft.Build.Evaluation
platformName string
return int

GetAutomationObject() public method

Proved access to an IDispatchable object being a list of configuration properties
public GetAutomationObject ( string configurationName, object &configurationProperties ) : int
configurationName string Combined Name and Platform for the configuration requested
configurationProperties object The IDispatchcable object
return int

GetBuildProjects() protected method

protected GetBuildProjects ( ) : IEnumerable
return IEnumerable

GetBuildProjects() protected method

protected GetBuildProjects ( bool includeUserBuildProjects ) : IEnumerable
includeUserBuildProjects bool
return IEnumerable

GetCfgNames() public method

Returns the existing configurations stored in the project file.
public GetCfgNames ( uint celt, string names, uint actual ) : int
celt uint Specifies the requested number of property names. If this number is unknown, can be zero.
names string On input, an allocated array to hold the number of configuration property names specified by . This parameter can also be a reference if the parameter is zero. /// On output, names contains configuration property names.
actual uint The actual number of property names returned.
return int

GetCfgOfName() public method

Returns the configuration associated with a specified configuration or platform name.
public GetCfgOfName ( string name, string platName, IVsCfg &cfg ) : int
name string The name of the configuration to be returned.
platName string The name of the platform for the configuration to be returned.
cfg IVsCfg The implementation of the IVsCfg interface.
return int

GetCfgProviderProperty() public method

Returns a specified configuration property.
public GetCfgProviderProperty ( int propid, object &var ) : int
propid int Specifies the property identifier for the property to return. For valid values, see and .
var object The value of the property.
return int

GetCfgs() public method

Returns the per-configuration objects for this object.
public GetCfgs ( uint celt, IVsCfg a, uint actual, uint flags ) : int
celt uint Number of configuration objects to be returned or zero, indicating a request for an unknown number of objects.
a IVsCfg On input, pointer to an interface array or a null reference. On output, this parameter points to an array of IVsCfg interfaces belonging to the requested configuration objects.
actual uint The number of configuration objects actually returned or a null reference, if this information is not necessary.
flags uint Flags that specify settings for project configurations, or a null reference (Nothing in Visual Basic) if no additional flag settings are required. For valid prgrFlags values, see __VSCFGFLAGS.
return int

GetConfigurationCondition() public method

public GetConfigurationCondition ( string configurationName ) : string
configurationName string
return string

GetConfigurationPlatformCondition() public method

public GetConfigurationPlatformCondition ( string configurationName, string platformName ) : string
configurationName string
platformName string
return string

GetDefaultOutputPath() protected method

protected GetDefaultOutputPath ( string configurationName, string platformName ) : string
configurationName string
platformName string
return string

GetDefaultPlatforms() protected method

protected GetDefaultPlatforms ( ) : string[]
return string[]

GetPlatformCondition() public method

public GetPlatformCondition ( string platformName ) : string
platformName string
return string

GetPlatformNameFromPlatformProperty() public method

Helper function to convert AnyCPU to Any CPU.
public GetPlatformNameFromPlatformProperty ( string platformProperty ) : string
platformProperty string
return string

GetPlatformNames() public method

Returns one or more platform names.
public GetPlatformNames ( uint celt, string names, uint actual ) : int
celt uint Specifies the requested number of platform names. If this number is unknown, can be zero.
names string On input, an allocated array to hold the number of platform names specified by . This parameter can also be if the parameter is zero. On output, contains platform names.
actual uint The actual number of platform names returned.
return int

GetPlatformPropertyFromPlatformName() public method

Helper function to convert Any CPU to AnyCPU.
public GetPlatformPropertyFromPlatformName ( string platformName ) : string
platformName string
return string

GetPlatforms() protected static method

Common method for handling platform names.
protected static GetPlatforms ( uint celt, string names, uint actual, string platforms ) : int
celt uint Specifies the requested number of platform names. If this number is unknown, celt can be zero.
names string On input, an allocated array to hold the number of platform names specified by celt. This parameter can also be null if the celt parameter is zero. On output, names contains platform names
actual uint A count of the actual number of platform names returned.
platforms string An array of available platform names
return int

GetPlatformsFromProject() protected method

Gets all the platforms defined in the project
protected GetPlatformsFromProject ( ) : string[]
return string[]

GetProjectConfiguration() protected method

Creates new Project Configuration objects based on the configuration name.
protected GetProjectConfiguration ( string configName, string platform ) : ProjectConfig
configName string The name of the configuration
platform string
return ProjectConfig

GetPropertiesConditionedOn() protected method

Get all the configurations in the project.
protected GetPropertiesConditionedOn ( string constant ) : string[]
constant string
return string[]

GetSupportedPlatformNames() public method

Returns the set of platforms that are installed on the user's machine.
public GetSupportedPlatformNames ( uint celt, string names, uint actual ) : int
celt uint Specifies the requested number of supported platform names. If this number is unknown, can be zero.
names string On input, an allocated array to hold the number of names specified by . This parameter can also be if the parameter is zero. On output, contains the names of supported platforms
actual uint The actual number of platform names returned.
return int

GetSupportedPlatformsFromProject() protected method

Return the supported platform names.
protected GetSupportedPlatformsFromProject ( ) : string[]
return string[]

NotifyOnCfgNameAdded() protected method

Called when a new configuration name was added.
protected NotifyOnCfgNameAdded ( string name ) : void
name string The name of configuration just added.
return void

NotifyOnCfgNameDeleted() protected method

Called when a config name was deleted.
protected NotifyOnCfgNameDeleted ( string name ) : void
name string The name of the configuration.
return void

NotifyOnCfgNameRenamed() protected method

Called when a config name was renamed
protected NotifyOnCfgNameRenamed ( string oldName, string newName ) : void
oldName string Old configuration name
newName string New configuration name
return void

NotifyOnPlatformNameAdded() protected method

Called when a platform name was added
protected NotifyOnPlatformNameAdded ( string platformName ) : void
platformName string The name of the platform.
return void

NotifyOnPlatformNameDeleted() protected method

Called when a platform name was deleted
protected NotifyOnPlatformNameDeleted ( string platformName ) : void
platformName string The name of the platform.
return void

OpenProjectCfg() public method

Provides access to the IVsProjectCfg interface implemented on a project's configuration object.
public OpenProjectCfg ( string projectCfgCanonicalName, IVsProjectCfg &projectCfg ) : int
projectCfgCanonicalName string The canonical name of the configuration to access.
projectCfg IVsProjectCfg The IVsProjectCfg interface of the configuration identified by szProjectCfgCanonicalName.
return int

RenameCfgsOfCfgName() public method

Assigns a new name to a configuration.
public RenameCfgsOfCfgName ( string old, string newname ) : int
old string The old name of the target configuration.
newname string The new name of the target configuration.
return int

RenameConfiguration() protected method

protected RenameConfiguration ( Microsoft.Build.Evaluation project, string oldConfigurationName, string newConfigurationName ) : int
project Microsoft.Build.Evaluation
oldConfigurationName string
newConfigurationName string
return int

UnadviseCfgProviderEvents() public method

Cancels a registration for configuration event notification.
public UnadviseCfgProviderEvents ( uint cookie ) : int
cookie uint The cookie used for registration.
return int

get_UsesIndependentConfigurations() public method

Checks whether or not this configuration provider uses independent configurations.
public get_UsesIndependentConfigurations ( int &usesIndependentConfigurations ) : int
usesIndependentConfigurations int true if independent configurations are used, false if they are not used. By default returns true.
return int