本文整理汇总了C#中MonoDevelop.Add方法的典型用法代码示例。如果您正苦于以下问题:C# MonoDevelop.Add方法的具体用法?C# MonoDevelop.Add怎么用?C# MonoDevelop.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoDevelop
的用法示例。
在下文中一共展示了MonoDevelop.Add方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PopulateSupportFileList
protected override void PopulateSupportFileList (MonoDevelop.Projects.FileCopySet list, ConfigurationSelector solutionConfiguration)
{
base.PopulateSupportFileList (list, solutionConfiguration);
//HACK: workaround for MD not local-copying package references
foreach (var projectReference in References) {
if (projectReference.Package != null && projectReference.Package.Name == "monogame") {
if (projectReference.ReferenceType == ReferenceType.Gac) {
foreach (var assem in projectReference.Package.Assemblies) {
list.Add (assem.Location);
var cfg = (MonoGameProjectConfiguration)solutionConfiguration.GetConfiguration (this);
if (cfg.DebugMode) {
var mdbFile = TargetRuntime.GetAssemblyDebugInfoFile (assem.Location);
if (System.IO.File.Exists (mdbFile))
list.Add (mdbFile);
}
}
}
break;
}
}
}
示例2: AddParameter
public void AddParameter (MonoDevelop.Projects.Dom.AbstractMember member, AParametersCollection parameters)
{
for (int i = 0; i < parameters.Count; i++) {
var p = (Parameter)parameters.FixedParameters[i];
DomParameter parameter = new DomParameter ();
parameter.Name = ConvertQuoted (p.Name);
parameter.Location = Convert (p.Location);
parameter.ReturnType = ConvertReturnType (p.TypeExpression);
var modifiers = MonoDevelop.Projects.Dom.ParameterModifiers.None;
if ((p.ParameterModifier & Parameter.Modifier.OUT) == Parameter.Modifier.OUT)
modifiers |= MonoDevelop.Projects.Dom.ParameterModifiers.Out;
if ((p.ParameterModifier & Parameter.Modifier.REF) == Parameter.Modifier.REF)
modifiers |= MonoDevelop.Projects.Dom.ParameterModifiers.Ref;
if ((p.ParameterModifier & Parameter.Modifier.PARAMS) == Parameter.Modifier.PARAMS)
modifiers |= MonoDevelop.Projects.Dom.ParameterModifiers.Params;
if ((p.ParameterModifier & Parameter.Modifier.This) == Parameter.Modifier.This)
modifiers |= MonoDevelop.Projects.Dom.ParameterModifiers.This;
parameter.ParameterModifiers = modifiers;
member.Add (parameter);
}
}
示例3: AddAttributes
public void AddAttributes (MonoDevelop.Projects.Dom.AbstractMember member, Attributes optAttributes, IMemberContext mc)
{
foreach (var attr in ConvertAttributes (optAttributes, mc))
member.Add (attr);
}
示例4: AddAttributes
public void AddAttributes (MonoDevelop.Projects.Dom.AbstractMember member, Attributes optAttributes)
{
if (optAttributes == null || optAttributes.Attrs == null)
return;
foreach (var attr in optAttributes.Attrs) {
DomAttribute domAttribute = new DomAttribute ();
domAttribute.Name = attr.Name;
domAttribute.Region = ConvertRegion (attr.Location, attr.Location);
domAttribute.AttributeType = new DomReturnType (attr.Name);
if (attr.PosArguments != null) {
for (int i = 0; i < attr.PosArguments.Count; i++) {
var val = attr.PosArguments[i].Expr as Constant;
if (val == null) {
continue;
}
domAttribute.AddPositionalArgument (new CodePrimitiveExpression (val.GetValue ()));
}
}
if (attr.NamedArguments != null) {
for (int i = 0; i < attr.NamedArguments.Count; i++) {
var val = attr.NamedArguments[i].Expr as Constant;
if (val == null)
continue;
domAttribute.AddNamedArgument (((NamedArgument)attr.NamedArguments[i]).Name, new CodePrimitiveExpression (val.GetValue ()));
}
}
member.Add (domAttribute);
}
}
示例5: AddAttributes
public void AddAttributes (MonoDevelop.Projects.Dom.AbstractMember member, Attributes optAttributes)
{
if (optAttributes == null || optAttributes.Attrs == null)
return;
foreach (var attr in optAttributes.Attrs) {
DomAttribute domAttribute = new DomAttribute ();
domAttribute.Name = attr.Name;
domAttribute.Region = ConvertRegion (attr.Location, attr.Location);
domAttribute.AttributeType = new DomReturnType (attr.Name);
member.Add (domAttribute);
}
}
示例6: PopulateSupportFileList
protected override void PopulateSupportFileList (MonoDevelop.Projects.FileCopySet list, ConfigurationSelector solutionConfiguration)
{
base.PopulateSupportFileList (list, solutionConfiguration);
//HACK: workaround for MD not local-copying package references
foreach (ProjectReference projectReference in References) {
if (projectReference.Package != null && projectReference.Package.Name == "system.web.mvc") {
if (projectReference.LocalCopy && projectReference.ReferenceType == ReferenceType.Gac)
foreach (MonoDevelop.Core.Assemblies.SystemAssembly assem in projectReference.Package.Assemblies)
list.Add (assem.Location);
break;
}
}
}