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;
				}
			}
		}
			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);
				}
			}
			public void AddAttributes (MonoDevelop.Projects.Dom.AbstractMember member, Attributes optAttributes, IMemberContext mc)
			{
				foreach (var attr in ConvertAttributes (optAttributes, mc))
					member.Add (attr);
			}
Exemple #4
0
			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);
				}
			}
Exemple #5
0
			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);
				}
			}
		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;
				}
			}
		}