当前位置: 首页>>代码示例>>C#>>正文


C# MonoDevelop类代码示例

本文整理汇总了C#中MonoDevelop的典型用法代码示例。如果您正苦于以下问题:C# MonoDevelop类的具体用法?C# MonoDevelop怎么用?C# MonoDevelop使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MonoDevelop类属于命名空间,在下文中一共展示了MonoDevelop类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Format

		public static void Format (MonoDevelop.Ide.Gui.Document data, ProjectDom dom, DomLocation location, bool correctBlankLines, bool runAferCR = false)
		{
			PolicyContainer policyParent = dom != null && dom.Project != null ? dom.Project.Policies
 : PolicyService.DefaultPolicies;
			var mimeTypeChain = DesktopService.GetMimeTypeInheritanceChain (CSharpFormatter.MimeType);
			Format (policyParent, mimeTypeChain, data, dom, location, correctBlankLines, runAferCR);
		}
开发者ID:sandyarmstrong,项目名称:monodevelop,代码行数:7,代码来源:OnTheFlyFormatter.cs

示例2: GetResolveResult

		public static ResolveResult GetResolveResult (MonoDevelop.Ide.Gui.Document doc)
		{
			ITextEditorResolver textEditorResolver = doc.GetContent<ITextEditorResolver> ();
			if (textEditorResolver != null)
				return textEditorResolver.GetLanguageItem (doc.Editor.Caret.Offset);
			return null;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:7,代码来源:RefactoryCommands.cs

示例3: OnBuild

		protected override BuildResult OnBuild (MonoDevelop.Core.IProgressMonitor monitor, ConfigurationSelector configuration)
		{
			var restResult = RestClient.CompileScripts ();
			var result = new BuildResult ();

			foreach (var message in restResult.Messages)
			{
				var file = BaseDirectory + "/" + message.File;
				var msg = message.Message;
				var errorNum = "";
				
				var messageStrings = message.Message.Split(':');

				if (messageStrings.Length == 3)
				{
					var errorNumStrings = messageStrings[1].Split(' ');

					if (errorNumStrings.Length > 1)
						errorNum = errorNumStrings[errorNumStrings.Length - 1];

					msg = messageStrings[2];
				}

				if(message.Type == "warning")
					result.AddWarning(file, message.Line, message.Column, errorNum, msg);
				else
					result.AddError(file, message.Line, message.Column, errorNum, msg);
			}
			
			return result;
		}
开发者ID:0xb1dd1e,项目名称:MonoDevelop.UnityMode,代码行数:31,代码来源:UnitySolution.cs

示例4: StyledSourceEditorOptions

		public StyledSourceEditorOptions (MonoDevelop.Ide.Editor.ITextEditorOptions optionsCore)
		{
			if (optionsCore == null)
				throw new ArgumentNullException ("optionsCore");
			this.optionsCore = optionsCore;
			DefaultSourceEditorOptions.Instance.Changed += HandleChanged;
		}
开发者ID:ArsenShnurkov,项目名称:monodevelop,代码行数:7,代码来源:StyledSourceEditorOptions.cs

示例5: HandleCompletion

		public Task<ICompletionDataList> HandleCompletion (MonoDevelop.Ide.Editor.TextEditor editor, DocumentContext context,	CodeCompletionContext completionContext,
			UnderlyingDocumentInfo docInfo, char currentChar, CancellationToken token)
		{
			CodeCompletionContext ccc;
			var completion = CreateCompletionAndUpdate (editor, context, docInfo, out ccc);
			return completion.HandleCodeCompletionAsync (completionContext, currentChar, token);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:RazorCSharpCompletionBuilder.cs

示例6: AnalyzeTargetExpression

		bool AnalyzeTargetExpression (RefactoringOptions options, MonoDevelop.CSharp.Ast.CompilationUnit unit)
		{
			var data = options.GetTextEditorData ();
			var target = unit.GetNodeAt (data.Caret.Line, data.Caret.Column);
			if (target == null)
				return false;
			if (target.Parent is MemberReferenceExpression && ((MemberReferenceExpression)target.Parent).GetChildByRole (MemberReferenceExpression.Roles.Identifier) == target) {
				var memberReference = (MemberReferenceExpression)target.Parent;
				target = memberReference.Target;
				var targetResult = options.GetResolver ().Resolve (new ExpressionResult (data.GetTextBetween (target.StartLocation.Line, target.StartLocation.Column, target.EndLocation.Line, target.EndLocation.Column)), resolvePosition);
				if (targetResult.StaticResolve)
					modifiers = MonoDevelop.Projects.Dom.Modifiers.Static;
				declaringType = options.Dom.GetType (targetResult.ResolvedType);
				methodName = memberReference.MemberName;
			} else if (target is Identifier) {
				declaringType = options.ResolveResult.CallingType;
				methodName = data.GetTextBetween (target.StartLocation.Line, target.StartLocation.Column, target.EndLocation.Line, target.EndLocation.Column);
			}
			
			if (declaringType != null && !HasCompatibleMethod (declaringType, methodName, invocation)) {
				if (declaringType.HasParts)
					declaringType = declaringType.Parts.FirstOrDefault (t => t.CompilationUnit.FileName == options.Document.FileName) ?? declaringType;
				var doc = ProjectDomService.GetParsedDocument (declaringType.SourceProjectDom, declaringType.CompilationUnit.FileName);
				declaringType = doc.CompilationUnit.GetTypeAt (declaringType.Location) ?? declaringType;
				return true;
			}
			return false;
		}
开发者ID:okrmartin,项目名称:monodevelop,代码行数:28,代码来源:CreateMethodCodeGenerator.cs

示例7: FindReferences

		public override IEnumerable<MemberReference> FindReferences (MonoDevelop.Projects.Project project, IProjectContent content, IEnumerable<FilePath> files, IProgressMonitor monitor, IEnumerable<object> searchedMembers)
		{ // TODO: Type system conversion.
			yield break;
//			var editor = TextFileProvider.Instance.GetTextEditorData (fileName);
//			AspNetAppProject project = dom.Project as AspNetAppProject;
//			if (project == null)
//				yield break;
//			
//			var unit = AspNetParserService.GetCompileUnit (project, fileName, true);
//			if (unit == null)
//				yield break;
//			var refman = new DocumentReferenceManager (project);
//			
//			var parsedAspDocument = (AspNetParsedDocument)new AspNetParser ().Parse (dom, fileName, editor.Text);
//			refman.Doc = parsedAspDocument;
//			
//			var usings = refman.GetUsings ();
//			var documentInfo = new DocumentInfo (dom, unit, usings, refman.GetDoms ());
//			
//			var builder = new AspLanguageBuilder ();
//			
//			
//			var buildDocument = new Mono.TextEditor.TextDocument ();
//			var offsetInfos = new List<LocalDocumentInfo.OffsetInfo> ();
//			buildDocument.Text = builder.BuildDocumentString (documentInfo, editor, offsetInfos, true);
//			var parsedDocument = AspLanguageBuilder.Parse (dom, fileName, buildDocument.Text);
//			foreach (var member in searchedMembers) {
//				foreach (var reference in SearchMember (member, dom, fileName, editor, buildDocument, offsetInfos, parsedDocument)) {
//					yield return reference;
//				}
//			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:32,代码来源:ASPNetReferenceFinder.cs

示例8: JumpToDeclaration

		public static void JumpToDeclaration (MonoDevelop.Ide.Gui.Document doc, RefactoringSymbolInfo info)
		{
			if (info.Symbol != null)
				RefactoringService.RoslynJumpToDeclaration (info.Symbol, doc.Project);
			if (info.CandidateSymbols.Length > 0)
				RefactoringService.RoslynJumpToDeclaration (info.CandidateSymbols[0], doc.Project);
		}
开发者ID:hbons,项目名称:monodevelop,代码行数:7,代码来源:GotoDeclarationHandler.cs

示例9: Compile

 protected override BuildResult Compile(MonoDevelop.Core.IProgressMonitor monitor, SolutionEntityItem item, BuildData buildData)
 {
     #if DEBUG
     monitor.Log.WriteLine("MonoGame Extension Compile Called");
     #endif
     try
     {
         var proj = item as MonoGameProject;
         if (proj == null)
         {
            return base.Compile (monitor, item, buildData);
         }
         monitor.Log.WriteLine("Compiling for {0}", proj.MonoGamePlatform);
         var results = new System.Collections.Generic.List<BuildResult>();
         foreach(var file in proj.Files)
         {
             if (MonoGameBuildAction.IsMonoGameBuildAction(file.BuildAction))
             {
                 buildData.Items.Add(file);
                 var buildResult = MonoGameContentProcessor.Compile(file, monitor, buildData);
                 results.Add(buildResult);
             }
         }
         return base.Compile (monitor, item, buildData).Append(results);
     }
     finally
     {
     #if DEBUG
         monitor.Log.WriteLine("MonoGame Extension Compile Ended");
     #endif
     }
 }
开发者ID:dellis1972,项目名称:MonoGameMonoDevelopAddin,代码行数:32,代码来源:MonoGameProject.cs

示例10: Compile

		protected override BuildResult Compile (MonoDevelop.Core.IProgressMonitor monitor, SolutionEntityItem item, BuildData buildData)
		{
			var proj = item as Project;
			if (proj == null)
				return base.Compile (monitor, item, buildData);
			if (!proj.GetProjectTypes().Any(x => supportedProjectTypes.ContainsKey(x)))
				return base.Compile (monitor, item, buildData);
			var files = buildData.Items.Where(x => x is ProjectFile).Cast<ProjectFile>().ToArray();
			foreach (var file in files.Where(f => f.BuildAction == "MonoGameContentReference")) {
				var path = System.IO.Path.Combine (Path.GetDirectoryName (file.FilePath.ToString ()), "bin", supportedProjectTypes[platform]);
				monitor.Log.WriteLine("Processing {0}", path);	
				if (!Directory.Exists (path))
					continue;
				foreach (var output in Directory.GetFiles (path, "*.*", SearchOption.AllDirectories)) {
					var link = string.Format ("Content{0}",  output.Replace (path, ""));
					if (proj.Files.FirstOrDefault (x => Path.GetFileName (x.FilePath.ToString ()) == Path.GetFileName (output)) == null) {
						monitor.Log.WriteLine ("Auto Including Content {0}", output);
						proj.Files.Add (new ProjectFile (output, BuildAction.BundleResource) {
							Link = new MonoDevelop.Core.FilePath (link),
							Flags = ProjectItemFlags.DontPersist | ProjectItemFlags.Hidden,
							Visible = false,
						});
					}
				}
			}
			return base.Compile (monitor, item, buildData);
		}
开发者ID:Cardanis,项目名称:MonoGame,代码行数:27,代码来源:MonoGameBuildExtension.cs

示例11: CommonTextEditorOptions

		CommonTextEditorOptions (MonoDevelop.Ide.Gui.Content.TextStylePolicy currentPolicy)
		{
			UpdateStylePolicy (currentPolicy);
			MonoDevelop.Ide.Editor.DefaultSourceEditorOptions.Instance.Changed += delegate(object sender, EventArgs e) {
				OnChanged (e);
			};
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:CommonTextEditorOptions.cs

示例12: GetFixes

		//FIXME: why is this invalid on the parseddocuments loaded when the doc is first loaded?
		//maybe the item's type's SourceProject is null?
		public IEnumerable<IAnalysisFixAction> GetFixes (MonoDevelop.Ide.Gui.Document doc, object fix)
		{
			var renameFix = (RenameMemberFix) fix;
			var refactoring = new RenameRefactoring ();
			var options = new RefactoringOptions () {
				Document = doc,
				Dom = doc.Dom,
				SelectedItem = renameFix.Item,
			};
			if (!refactoring.IsValid (options))
				yield break;
			
			var prop = new RenameRefactoring.RenameProperties () {
				NewName = renameFix.NewName,
			};
			
			yield return new RenameFixAction () {
				Label = GettextCatalog.GetString ("Rename '{0}' to '{1}'", renameFix.Item.Name, renameFix.NewName),
				Refactoring = refactoring,
				Options = options,
				Properties = prop,
				Preview = false,
			};
				
			yield return new RenameFixAction () {
				Label = GettextCatalog.GetString ("Rename '{0}' to '{1}' with preview",
					renameFix.Item.Name, renameFix.NewName),
				Refactoring = refactoring,
				Options = options,
				Properties = prop,
				Preview = true,
			};
		}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:35,代码来源:RenameMemberFix.cs

示例13: GetActions

		public override IEnumerable<MonoDevelop.CodeActions.CodeAction> GetActions (MonoDevelop.Ide.Gui.Document document, object refactoringContext, TextLocation loc, CancellationToken cancellationToken)
		{
			var context = refactoringContext as MDRefactoringContext;
			if (context == null)
				return Enumerable.Empty<MonoDevelop.CodeActions.CodeAction> ();
			return GetActions (context);
		}
开发者ID:fedorw,项目名称:monodevelop,代码行数:7,代码来源:MoveTypeToFile.cs

示例14: ProgressDialog

		public ProgressDialog (MonoDevelop.Components.Window parent, bool allowCancel, bool showDetails)
		{
			MonoDevelop.Components.IdeTheme.ApplyTheme (this);
			this.Build ();
			this.Title = BrandingService.ApplicationName;
			HasSeparator = false;
			ActionArea.Hide ();
			DefaultHeight = 5;
			
			TransientFor = parent;
			
			btnCancel.Visible = allowCancel;

			expander.Visible = showDetails;
			
			buffer = detailsTextView.Buffer;
			detailsTextView.Editable = false;
			
			bold = new TextTag ("bold");
			bold.Weight = Pango.Weight.Bold;
			buffer.TagTable.Add (bold);
			
			tag = new TextTag ("0");
			tag.Indent = 10;
			buffer.TagTable.Add (tag);
			tags.Add (tag);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:27,代码来源:ProgressDialog.cs

示例15: SupportsFramework

		public override bool SupportsFramework (MonoDevelop.Core.Assemblies.TargetFramework framework)
		{
			if (!framework.IsCompatibleWithFramework (MonoDevelop.Core.Assemblies.TargetFrameworkMoniker.NET_4_0))
				return false;
			else
				return base.SupportsFramework (framework);
		}
开发者ID:jschieck,项目名称:MonoGame-2.5.1.0-0,代码行数:7,代码来源:MonoGameProject.cs


注:本文中的MonoDevelop类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。