本文整理汇总了C#中IVsCfg类的典型用法代码示例。如果您正苦于以下问题:C# IVsCfg类的具体用法?C# IVsCfg怎么用?C# IVsCfg使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IVsCfg类属于命名空间,在下文中一共展示了IVsCfg类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: NodejsUwpProjectFlavorCfg
public NodejsUwpProjectFlavorCfg(NodejsUwpProjectFlavor baseProjectNode, IVsCfg baseConfiguration, IVsProjectFlavorCfg innerConfiguration)
{
_baseCfg = baseConfiguration;
_innerCfg = innerConfiguration;
project = baseProjectNode;
mapIVsCfgToNodejsUwpProjectFlavorCfg.Add(baseConfiguration, this);
}
开发者ID:ranjaniryan,项目名称:ntvsiot,代码行数:7,代码来源:NodejsUwpProjectFlavorCfg.cs
示例2: VsProjectFlavorCfg
public VsProjectFlavorCfg(VsProject project, IVsCfg baseCfg)
{
m_vsCfg = baseCfg;
m_project = project;
m_innerIVsDebuggableProjectCfg = m_vsCfg as IVsDebuggableProjectCfg;
m_IVsBuildPropertyStorage = m_project as IVsBuildPropertyStorage;
Debug.Assert(m_innerIVsDebuggableProjectCfg != null);
m_connectionsDeployStatusCallback = new ConnectionPoint.Connections();
DeployPropertyPort = new ProjectBuildProperty("DeployTransport", m_IVsBuildPropertyStorage, this, _PersistStorageType.PST_USER_FILE, _PersistStorageType.PST_PROJECT_FILE, DebugPort.NameFromPortFilter(PortFilter.Emulator));
DeployPropertyDevice = new ProjectBuildProperty("DeployDevice", m_IVsBuildPropertyStorage, this, _PersistStorageType.PST_USER_FILE, _PersistStorageType.PST_PROJECT_FILE);
GenerateStubsFlag = new ProjectBuildPropertyBool("MF_GenerateStubs", m_IVsBuildPropertyStorage, this, _PersistStorageType.PST_USER_FILE);
GenerateStubsRootName = new ProjectBuildProperty("MF_GenerateStubsRootName", m_IVsBuildPropertyStorage, this, _PersistStorageType.PST_USER_FILE, _PersistStorageType.PST_PROJECT_FILE, "TARGET");
GenerateStubsDirectory = new ProjectBuildProperty("MF_GenerateStubsDirectory", m_IVsBuildPropertyStorage, this, _PersistStorageType.PST_USER_FILE, _PersistStorageType.PST_PROJECT_FILE, "DIRECTORY");
try
{
ActivateDebugEngine();
}
catch (Exception e)
{
VsPackage.MessageCentre.InternalErrorMsg(false, String.Format("Unable to register debug engine: {0}", e.Message));
}
}
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:28,代码来源:VsProjectFlavorCfg.cs
示例3:
int IVsUpdateSolutionEvents2.UpdateProjectCfg_Begin(
IVsHierarchy pHierProj, IVsCfg pCfgProj, IVsCfg pCfgSln, uint dwAction, ref int pfCancel)
{
//
// if clean project or solution, dwAction == 0x100000
// if build project or solution, dwAction == 0x010000
// if rebuild project or solution, dwAction == 0x410000
//
if (dwAction == 0x010000
|| dwAction == 0x410000)
{
var validationSuccessful =
VisualStudioEdmxValidator.LoadAndValidateAllFilesInProject(
pHierProj, /*doEscherValidation*/ false, ShouldValidateArtifactDuringBuild);
// we cause a 'build break' for command-line builds by setting PfCancel = 1
if (PackageManager.Package.IsBuildingFromCommandLine
&& !validationSuccessful)
{
pfCancel = 1;
}
}
return VSConstants.S_OK;
}
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:25,代码来源:EdmUpdateSolutionEvents.cs
示例4: GetNameProperty
int IVsUpdateSolutionEvents2.UpdateProjectCfg_Done(IVsHierarchy pHierProj, IVsCfg pCfgProj, IVsCfg pCfgSln, uint dwAction, int fSuccess, int fCancel)
{
var name = GetNameProperty(pHierProj);
var folder = GetProjectDirectoryProperty(pHierProj);
if (!string.IsNullOrEmpty(name))
BuildFinishedEvent(this, new SolutionBuildFinishedEvent() { ProjectName = name, ProjectFolder = folder });
return VSConstants.S_OK;
}
开发者ID:xoriath,项目名称:atmelstudio-fstack-usage,代码行数:10,代码来源:SolutionEventsListener.cs
示例5: GetCfgOfName
public void GetCfgOfName(string name, string platName, out IVsCfg cfg) {
CCITracing.TraceCall();
cfg = null;
foreach (XmlElement e in this.projectManager.StateElement.SelectNodes("Build/Settings/Config")) {
if (name == e.GetAttribute("Name")) {
cfg = new ProjectConfig(this.projectManager, e);
break;
}
}
}
开发者ID:hesam,项目名称:SketchSharp,代码行数:10,代码来源:configprovider.cs
示例6: GetACSPropertyPageProjectFlavorCfgFromIVsCfg
internal static ACSPropertyPageProjectFlavorCfg GetACSPropertyPageProjectFlavorCfgFromIVsCfg(IVsCfg configuration)
{
if (mapIVsCfgToACSPropertyPageProjectFlavorCfg.ContainsKey(configuration))
{
return (ACSPropertyPageProjectFlavorCfg)mapIVsCfgToACSPropertyPageProjectFlavorCfg[configuration];
}
else
{
throw new ArgumentOutOfRangeException("Cannot find configuration in mapIVsCfgToSpecializedCfg.");
}
}
开发者ID:Exclr8,项目名称:CloudCore,代码行数:11,代码来源:ACSPropertyPageProjectFlavorConfig.cs
示例7: UpdateProjectCfg_Done
/// <summary>
/// This is overridden to open the help file after a successful build or the log viewer tool window
/// after a failed build if so indicated by the Sandcastle Help File Builder options.
/// </summary>
/// <inheritdoc />
/// <remarks>Note that the base method documentation is wrong. The action parameter is actually a
/// combination of VSSOLNBUILDUPDATEFLAGS values.</remarks>
public override int UpdateProjectCfg_Done(IVsHierarchy hierarchy, IVsCfg configProject,
IVsCfg configSolution, uint action, int success, int cancel)
{
SandcastleBuilderProjectNode projectNode;
SandcastleBuilderOptionsPage options;
ProjectConfig cfg = configProject as ProjectConfig;
if(cfg != null)
{
if(cancel == 0 && success != 0)
{
// Open the help file on a successful build if so requested
projectNode = cfg.ProjectMgr as SandcastleBuilderProjectNode;
options = SandcastleBuilderPackage.Instance.GeneralOptions;
if(projectNode != null && options != null)
if((action & (uint)VSSOLNBUILDUPDATEFLAGS.SBF_OPERATION_BUILD) != 0 && options.OpenHelpAfterBuild)
SandcastleBuilderPackage.Instance.ViewBuiltHelpFile(projectNode);
else
if((action & (uint)VSSOLNBUILDUPDATEFLAGS.SBF_OPERATION_CLEAN) != 0)
{
var window = cfg.ProjectMgr.Package.FindToolWindow(typeof(ToolWindows.BuildLogToolWindow), 0, false) as
BuildLogToolWindow;
if(window != null)
window.ClearLog();
}
}
else
if(cancel == 0 && success == 0)
{
// Open the build log tool window on a failed build if so requested
projectNode = cfg.ProjectMgr as SandcastleBuilderProjectNode;
options = SandcastleBuilderPackage.Instance.GeneralOptions;
if(projectNode != null && options != null)
if((action & (uint)VSSOLNBUILDUPDATEFLAGS.SBF_OPERATION_BUILD) != 0 && options.OpenLogViewerOnFailedBuild)
projectNode.OpenBuildLogToolWindow(true);
else
{
// The user doesn't want it opened. However, if it's already open, refresh the
// log file reference so that it shows the correct file when it is displayed.
var window = cfg.ProjectMgr.Package.FindToolWindow(typeof(ToolWindows.BuildLogToolWindow), 0, false) as
BuildLogToolWindow;
if(window != null && ((IVsWindowFrame)window.Frame).IsVisible() == VSConstants.S_OK)
projectNode.OpenBuildLogToolWindow(false);
}
}
}
return VSConstants.S_OK;
}
开发者ID:julianhaslinger,项目名称:SHFB,代码行数:60,代码来源:BuildCompletedEventListener.cs
示例8: CreateProjectFlavorCfg
public int CreateProjectFlavorCfg(IVsCfg pBaseProjectCfg, out IVsProjectFlavorCfg ppFlavorCfg)
{
IVsProjectFlavorCfg cfg;
ErrorHandler.ThrowOnFailure(
_innerVsProjectFlavorCfgProvider.CreateProjectFlavorCfg(
pBaseProjectCfg,
out cfg
)
);
ppFlavorCfg = _config = new NodejsUwpProjectFlavorCfg(this, pBaseProjectCfg, cfg);
return VSConstants.S_OK;
}
开发者ID:munyirik,项目名称:ntvsiot,代码行数:13,代码来源:NodejsUwpProjectFlavor.cs
示例9: PersistXMLFragments
protected void PersistXMLFragments()
{
if (this.IsFlavorDirty() != 0)
{
XmlDocument doc = new XmlDocument();
XmlElement root = doc.CreateElement("ROOT");
// We will need the list of configuration inside the loop, so get it before entering the loop
uint[] count = new uint[1];
IVsCfg[] configs = null;
int hr = this.ConfigProvider.GetCfgs(0, null, count, null);
if (ErrorHandler.Succeeded(hr) && count[0] > 0)
{
configs = new IVsCfg[count[0]];
hr = this.ConfigProvider.GetCfgs((uint)configs.Length, configs, count, null);
if (ErrorHandler.Failed(hr))
count[0] = 0;
}
if (count[0] == 0)
configs = new IVsCfg[0];
// We need to loop through all the flavors
string flavorsGuid;
ErrorHandler.ThrowOnFailure(((IVsAggregatableProject)this).GetAggregateProjectTypeGuids(out flavorsGuid));
foreach (Guid flavor in Utilities.GuidsArrayFromSemicolonDelimitedStringOfGuids(flavorsGuid))
{
IPersistXMLFragment outerHierarchy = HierarchyNode.GetOuterHierarchy(this) as IPersistXMLFragment;
// First check the project
if (outerHierarchy != null)
{
// Retrieve the XML fragment
string fragment = string.Empty;
Guid flavorGuid = flavor;
ErrorHandler.ThrowOnFailure((outerHierarchy).Save(ref flavorGuid, (uint)_PersistStorageType.PST_PROJECT_FILE, out fragment, 1));
if (!String.IsNullOrEmpty(fragment))
{
// Add the fragment to our XML
WrapXmlFragment(doc, root, flavor, null, fragment);
}
// While we don't yet support user files, our flavors might, so we will store that in the project file until then
// TODO: Refactor this code when we support user files
fragment = String.Empty;
ErrorHandler.ThrowOnFailure((outerHierarchy).Save(ref flavorGuid, (uint)_PersistStorageType.PST_USER_FILE, out fragment, 1));
if (!String.IsNullOrEmpty(fragment))
{
// Add the fragment to our XML
XmlElement node = WrapXmlFragment(doc, root, flavor, null, fragment);
node.Attributes.Append(doc.CreateAttribute(ProjectFileConstants.User));
}
}
// Then look at the configurations
foreach (IVsCfg config in configs)
{
// Get the fragment for this flavor/config pair
string fragment;
ErrorHandler.ThrowOnFailure(((ProjectConfig)config).GetXmlFragment(flavor, _PersistStorageType.PST_PROJECT_FILE, out fragment));
if (!String.IsNullOrEmpty(fragment))
{
string configName;
ErrorHandler.ThrowOnFailure(config.get_DisplayName(out configName));
WrapXmlFragment(doc, root, flavor, configName, fragment);
}
}
}
if (root.ChildNodes != null && root.ChildNodes.Count > 0)
{
// Save our XML (this is only the non-build information for each flavor) in msbuild
SetProjectExtensions(ProjectFileConstants.VisualStudio, root.InnerXml.ToString());
}
}
}
开发者ID:IntelliTect,项目名称:PowerStudio,代码行数:72,代码来源:ProjectNode.cs
示例10: IsFlavorDirty
protected int IsFlavorDirty()
{
int isDirty = 0;
// See if one of our flavor consider us dirty
IPersistXMLFragment outerHierarchy = HierarchyNode.GetOuterHierarchy(this) as IPersistXMLFragment;
if (outerHierarchy != null)
{
// First check the project
ErrorHandler.ThrowOnFailure(outerHierarchy.IsFragmentDirty((uint)_PersistStorageType.PST_PROJECT_FILE, out isDirty));
// While we don't yet support user files, our flavors might, so we will store that in the project file until then
// TODO: Refactor this code when we support user files
if (isDirty == 0)
ErrorHandler.ThrowOnFailure(outerHierarchy.IsFragmentDirty((uint)_PersistStorageType.PST_USER_FILE, out isDirty));
}
if (isDirty == 0)
{
// Then look at the configurations
uint[] count = new uint[1];
int hr = this.ConfigProvider.GetCfgs(0, null, count, null);
if (ErrorHandler.Succeeded(hr) && count[0] > 0)
{
// We need to loop through the configurations
IVsCfg[] configs = new IVsCfg[count[0]];
hr = this.ConfigProvider.GetCfgs((uint)configs.Length, configs, count, null);
Debug.Assert(ErrorHandler.Succeeded(hr), "failed to retrieve configurations");
foreach (IVsCfg config in configs)
{
isDirty = ((ProjectConfig)config).IsFlavorDirty(_PersistStorageType.PST_PROJECT_FILE);
if (isDirty != 0)
break;
}
}
}
return isDirty;
}
开发者ID:IntelliTect,项目名称:PowerStudio,代码行数:35,代码来源:ProjectNode.cs
示例11: GetCfgOfName
/// <summary>
/// Returns the configuration associated with a specified configuration or platform name.
/// </summary>
/// <param name="name">The name of the configuration to be returned.</param>
/// <param name="platName">The name of the platform for the configuration to be returned.</param>
/// <param name="cfg">The implementation of the IVsCfg interface.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public override int GetCfgOfName(string name, string platName, out IVsCfg cfg)
{
cfg = this.GetProjectConfiguration(name, platName);
return VSConstants.S_OK;
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:13,代码来源:WixConfigProvider.cs
示例12: UpdateProjectCfg_Begin
public int UpdateProjectCfg_Begin(IVsHierarchy pHierProj, IVsCfg pCfgProj, IVsCfg pCfgSln, uint dwAction, ref int pfCancel)
{
return VSConstants.S_OK;
}
开发者ID:mikegeyser,项目名称:bldr,代码行数:4,代码来源:Bldr-AddInPackage.cs
示例13: UpdateProjectCfg_Begin
/// <summary>
/// Called right before a project configuration begins to build.
/// </summary>
/// <param name="hierarchy">The project that is to be build.</param>
/// <param name="configProject">A configuration project object.</param>
/// <param name="configSolution">A configuration solution object.</param>
/// <param name="action">The action taken.</param>
/// <param name="cancel">A flag indicating cancel.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
/// <remarks>The values for the action are defined in the enum _SLNUPDACTION env\msenv\core\slnupd2.h</remarks>
public int UpdateProjectCfg_Begin(IVsHierarchy hierarchy, IVsCfg configProject, IVsCfg configSolution, uint action, ref int cancel) {
return VSConstants.E_NOTIMPL;
}
开发者ID:RussBaz,项目名称:PTVS,代码行数:13,代码来源:UpdateSolutionEventsListener.cs
示例14: return
int IVsProjectCfgProvider.GetCfgs(uint celt, IVsCfg[] rgpcfg, uint[] pcActual, uint[] prgfFlags)
{
return ((IVsCfgProvider2)this).GetCfgs(celt, rgpcfg, pcActual, prgfFlags);
}
开发者ID:sillsdev,项目名称:FwSupportTools,代码行数:4,代码来源:ConfigurationProvider.cs
示例15: GetCfg
public int GetCfg(out IVsCfg ppCfg)
{
ppCfg = this;
return VSConstants.S_OK;
}
开发者ID:ranjaniryan,项目名称:ntvsiot,代码行数:5,代码来源:NodejsUwpProjectFlavorCfg.cs
示例16: NodejsUwpProjectFlavorCfg
public NodejsUwpProjectFlavorCfg(NodejsUwpProjectFlavor baseProjectNode, IVsCfg baseConfiguration, IVsProjectFlavorCfg innerConfiguration)
{
_baseCfg = baseConfiguration;
_innerCfg = innerConfiguration;
project = baseProjectNode;
mapIVsCfgToNodejsUwpProjectFlavorCfg.Add(baseConfiguration, this);
serviceProvider = this.project as System.IServiceProvider;
packagesToDeployList = new VsBootstrapperPackageInfo[] {
new VsBootstrapperPackageInfo { PackageName = "D8B19935-BDBF-4D5B-9619-A6693AFD4554" }, // ScriptMsVsMon
new VsBootstrapperPackageInfo { PackageName = "EB22551A-7F66-465F-B53F-E5ABA0C0574E" }, // NativeMsVsMon
new VsBootstrapperPackageInfo { PackageName = "62B807E2-6539-46FB-8D67-A73DC9499940" } // ManagedMsVsMon
};
optionalPackagesToDeploy = new VsBootstrapperPackageInfo[] {
new VsBootstrapperPackageInfo { PackageName = "FEC73B34-86DE-4EA8-BFF4-3600A0443E9C" }, // NativeMsVsMonDependency
new VsBootstrapperPackageInfo { PackageName = "B968CC6A-D2C8-4197-88E3-11662042C291" }, // XamlUIDebugging
new VsBootstrapperPackageInfo { PackageName = "8CDEABEF-33E1-4A23-A13F-94A49FF36E84" } // XamlUIDebuggingDependency
};
}
开发者ID:mdbconsulting,项目名称:ntvsiot,代码行数:19,代码来源:NodejsUwpProjectFlavorCfg.cs
示例17: CreateProjectFlavorCfg
public int CreateProjectFlavorCfg(IVsCfg pBaseProjectCfg, out IVsProjectFlavorCfg ppFlavorCfg) {
// We're flavored with a Web Application project and our normal
// project... But we don't want the web application project to
// influence our config as that alters our debug launch story. We
// control that w/ the web project which is actually just letting
// the base Python project handle it. So we keep the base Python
// project config here.
IVsProjectFlavorCfg webCfg;
ErrorHandler.ThrowOnFailure(
_innerVsProjectFlavorCfgProvider.CreateProjectFlavorCfg(
pBaseProjectCfg,
out webCfg
)
);
ppFlavorCfg = new PythonWebProjectConfig(pBaseProjectCfg, webCfg);
return VSConstants.S_OK;
}
开发者ID:zooba,项目名称:PTVS,代码行数:17,代码来源:PythonWebProject.cs
示例18:
int IVsCfgProvider2.GetCfgs(uint celt, IVsCfg[] rgpcfg, uint[] pcActual, uint[] prgfFlags)
{
// prgfFlags is ignored because according to the documentation, the flags are currently not used.
if (celt == 0)
{
// When celt (the count of elements) is zero, then the caller is requesting the
// total size of the array, which will be returned in pcActual.
pcActual[0] = (uint)this.ProjectConfigurations.Count;
}
else
{
// If celt is non-zero, but the array is null, then we've got a problem.
Tracer.VerifyNonNullArgument(rgpcfg, "rgpcfg");
// celt could very well be larger than our array, so we have to stop looping
// when celt or Count is reached, whichever is lower.
int totalToRetrieve = Math.Min((int)celt, this.ProjectConfigurations.Count);
for (int i = 0; i < totalToRetrieve; i++)
{
rgpcfg[i] = (IVsCfg)this.ProjectConfigurations[i];
}
pcActual[0] = (uint)totalToRetrieve;
}
return NativeMethods.S_OK;
}
开发者ID:sillsdev,项目名称:FwSupportTools,代码行数:27,代码来源:ConfigurationProvider.cs
示例19: OnAfterActiveSolutionCfgChange
/// <summary>
/// Fired after the active solution config is changed (pOldActiveSlnCfg can be NULL).
/// </summary>
/// <param name="oldActiveSlnCfg">Old configuration.</param>
/// <param name="newActiveSlnCfg">New configuration.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public virtual int OnAfterActiveSolutionCfgChange(IVsCfg oldActiveSlnCfg, IVsCfg newActiveSlnCfg) {
var handlers = AfterActiveSolutionConfigurationChange;
if (handlers != null) {
handlers(this, EventArgs.Empty);
}
return VSConstants.S_OK;
}
开发者ID:RussBaz,项目名称:PTVS,代码行数:13,代码来源:UpdateSolutionEventsListener.cs
示例20: GetCfg
/// <summary>
/// Maps back to the configuration corresponding to the browse object.
/// </summary>
/// <param name="cfg">The IVsCfg object represented by the browse object</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code. </returns>
public virtual int GetCfg(out IVsCfg cfg)
{
cfg = this;
return VSConstants.S_OK;
}
开发者ID:dedale,项目名称:visualfsharp,代码行数:10,代码来源:ProjectConfig.cs
注:本文中的IVsCfg类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论