Exemple #1
0
 /// <summary>Initializes a new instance of the SourceControl class.</summary>
 internal SourceControl(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule, Microsoft.VisualStudio.ProjectSystem.ConfiguredProject configuredProject) :
     this(rule) {
     if ((rule == null))
     {
         throw new System.ArgumentNullException("rule");
     }
     if ((configuredProject == null))
     {
         throw new System.ArgumentNullException("configuredProject");
     }
     this.configuredProject = configuredProject;
     this.rule     = rule;
     this.file     = this.rule.File;
     this.itemType = this.rule.ItemType;
     this.itemName = this.rule.ItemName;
 }
 /// <summary>Initializes a new instance of the RazorComponentWithTargetPath class.</summary>
 internal RazorComponentWithTargetPath(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule, Microsoft.VisualStudio.ProjectSystem.ConfiguredProject configuredProject) :
     this(rule)
 {
     if ((rule is null))
     {
         throw new System.ArgumentNullException("rule");
     }
     if ((configuredProject is null))
     {
         throw new System.ArgumentNullException("configuredProject");
     }
     this.configuredProject = configuredProject;
     this.rule     = rule;
     this.file     = this.rule.File;
     this.itemType = this.rule.ItemType;
     this.itemName = this.rule.ItemName;
 }
 private void InitializeFallbackRule()
 {
     if ((this.configuredProject == null))
     {
         return;
     }
     Microsoft.Build.Framework.XamlTypes.Rule unboundRule = RazorComponentWithTargetPath.deserializedFallbackRule;
     if ((unboundRule == null))
     {
         System.IO.Stream           xamlStream   = null;
         System.Reflection.Assembly thisAssembly = System.Reflection.Assembly.GetExecutingAssembly();
         try
         {
             xamlStream = thisAssembly.GetManifestResourceStream("XamlRuleToCode:RazorComponentWithTargetPath.xaml");
             Microsoft.Build.Framework.XamlTypes.IProjectSchemaNode root           = ((Microsoft.Build.Framework.XamlTypes.IProjectSchemaNode)(System.Xaml.XamlServices.Load(xamlStream)));
             System.Collections.Generic.IEnumerator <System.Object> ruleEnumerator = root.GetSchemaObjects(typeof(Microsoft.Build.Framework.XamlTypes.Rule)).GetEnumerator();
             for (
                 ; ((unboundRule == null) &&
                    ruleEnumerator.MoveNext());
                 )
             {
                 Microsoft.Build.Framework.XamlTypes.Rule t = ((Microsoft.Build.Framework.XamlTypes.Rule)(ruleEnumerator.Current));
                 if (System.StringComparer.OrdinalIgnoreCase.Equals(t.Name, SchemaName))
                 {
                     unboundRule      = t;
                     unboundRule.Name = "7bce92b9d442fe435263d738937cc0845b32e8219c968e23697081db5a869f4a";
                     RazorComponentWithTargetPath.deserializedFallbackRule = unboundRule;
                 }
             }
         }
         finally
         {
             if ((xamlStream != null))
             {
                 ((System.IDisposable)(xamlStream)).Dispose();
             }
         }
     }
     this.configuredProject.Services.AdditionalRuleDefinitions.AddRuleDefinition(unboundRule, "FallbackRuleCodeGenerationContext");
     Microsoft.VisualStudio.ProjectSystem.Properties.IPropertyPagesCatalog catalog = this.configuredProject.Services.PropertyPagesCatalog.GetMemoryOnlyCatalog("FallbackRuleCodeGenerationContext");
     this.fallbackRule = catalog.BindToContext(unboundRule.Name, this.file, this.itemType, this.itemName);
 }
 private void InitializeFallbackRule()
 {
     if ((this.configuredProject == null))
     {
         return;
     }
     Microsoft.Build.Framework.XamlTypes.Rule unboundRule = RazorExtension.deserializedFallbackRule;
     if ((unboundRule == null))
     {
         System.IO.Stream           xamlStream   = null;
         System.Reflection.Assembly thisAssembly = System.Reflection.Assembly.GetExecutingAssembly();
         try
         {
             xamlStream = thisAssembly.GetManifestResourceStream("XamlRuleToCode:RazorExtension.xaml");
             Microsoft.Build.Framework.XamlTypes.IProjectSchemaNode root           = ((Microsoft.Build.Framework.XamlTypes.IProjectSchemaNode)(System.Xaml.XamlServices.Load(xamlStream)));
             System.Collections.Generic.IEnumerator <System.Object> ruleEnumerator = root.GetSchemaObjects(typeof(Microsoft.Build.Framework.XamlTypes.Rule)).GetEnumerator();
             for (
                 ; ((unboundRule == null) &&
                    ruleEnumerator.MoveNext());
                 )
             {
                 Microsoft.Build.Framework.XamlTypes.Rule t = ((Microsoft.Build.Framework.XamlTypes.Rule)(ruleEnumerator.Current));
                 if (System.StringComparer.OrdinalIgnoreCase.Equals(t.Name, SchemaName))
                 {
                     unboundRule      = t;
                     unboundRule.Name = "e8ad5dd707beca947f7c014baa70b46c1d7a7fd6c8b49a5511ab299d8e1a3c70";
                     RazorExtension.deserializedFallbackRule = unboundRule;
                 }
             }
         }
         finally
         {
             if ((xamlStream != null))
             {
                 ((System.IDisposable)(xamlStream)).Dispose();
             }
         }
     }
     this.configuredProject.Services.AdditionalRuleDefinitions.AddRuleDefinition(unboundRule, "FallbackRuleCodeGenerationContext");
     Microsoft.VisualStudio.ProjectSystem.Properties.IPropertyPagesCatalog catalog = this.configuredProject.Services.PropertyPagesCatalog.GetMemoryOnlyCatalog("FallbackRuleCodeGenerationContext");
     this.fallbackRule = catalog.BindToContext(unboundRule.Name, this.file, this.itemType, this.itemName);
 }
 /// <summary>Gets the strongly-typed property accessor used to get value from the current project snapshot Razor Document Properties properties.</summary>
 internal bool TryGetCurrentRazorComponentWithTargetPathPropertiesSnapshot(out RazorComponentWithTargetPath snapshot, [System.Runtime.InteropServices.OptionalAttribute()][System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] bool requiredToMatchProjectVersion)
 {
     snapshot = null;
     Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue <Microsoft.VisualStudio.ProjectSystem.Properties.IProjectCatalogSnapshot> catalogSnapshot;
     if (this.TryGetCurrentCatalogSnapshot(out catalogSnapshot))
     {
         if (requiredToMatchProjectVersion)
         {
             if ((this.ConfiguredProject.ProjectVersion.CompareTo(catalogSnapshot.DataSourceVersions[Microsoft.VisualStudio.ProjectSystem.ProjectDataSources.ConfiguredProjectVersion]) != 0))
             {
                 return(false);
             }
         }
         Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule = this.GetSnapshotRule(catalogSnapshot.Value, "Project", RazorComponentWithTargetPath.SchemaName);
         if ((rule != null))
         {
             snapshot = new RazorComponentWithTargetPath(rule, this.ConfiguredProject);
             return(true);
         }
     }
     return(false);
 }
Exemple #6
0
 /// <summary>Initializes a new instance of the MbedDebugger class.</summary>
 internal MbedDebugger(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule)
 {
     this.rule = rule;
 }
Exemple #7
0
 /// <summary>Initializes a new instance of the ConfigurationRun class.</summary>
 internal ConfigurationRun(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule)
 {
     this.rule = rule;
 }
Exemple #8
0
 /// <summary>Initializes a new instance of the PyOCD class.</summary>
 internal PyOCD(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule)
 {
     this.rule = rule;
 }
Exemple #9
0
 /// <summary>Initializes a new instance of the MyCustomPropertyPage class.</summary>
 internal MyCustomPropertyPage(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule)
 {
     this.rule = rule;
 }
Exemple #10
0
 /// <summary>Initializes a new instance of the RazorExtension class.</summary>
 internal RazorExtension(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule)
 {
     this.rule = rule;
 }
 /// <summary>Initializes a new instance of the VendorNameCoolDebugger class.</summary>
 internal VendorNameCoolDebugger(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule)
 {
     this.rule = rule;
 }
 /// <summary>Initializes a new instance of the RazorGeneral class.</summary>
 internal RazorGeneral(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule)
 {
     this.rule = rule;
 }
Exemple #13
0
 /// <summary>Initializes a new instance of the SourceControl class.</summary>
 internal SourceControl(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule)
 {
     this.rule = rule;
 }
Exemple #14
0
 /// <summary>Initializes a new instance of the DebuggerGeneralProperties class.</summary>
 internal DebuggerGeneralProperties(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule)
 {
     this.rule = rule;
 }
 /// <summary>Initializes a new instance of the ResolvedAssemblyReference class.</summary>
 internal ResolvedAssemblyReference(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule)
 {
     this.rule = rule;
 }
Exemple #16
0
 /// <summary>Initializes a new instance of the ComReference class.</summary>
 internal ComReference(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule)
 {
     this.rule = rule;
 }
 /// <summary>Initializes a new instance of the RazorComponentWithTargetPath class.</summary>
 internal RazorComponentWithTargetPath(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule)
 {
     this.rule = rule;
 }
Exemple #18
0
 /// <summary>Initializes a new instance of the EmbeddedResource class.</summary>
 internal EmbeddedResource(Microsoft.VisualStudio.ProjectSystem.Properties.IRule rule)
 {
     this.rule = rule;
 }