當前位置: 首頁>>代碼示例>>C#>>正文


C# CodeGeneration.CodeGenerationOptions類代碼示例

本文整理匯總了C#中MonoDevelop.CodeGeneration.CodeGenerationOptions的典型用法代碼示例。如果您正苦於以下問題:C# CodeGenerationOptions類的具體用法?C# CodeGenerationOptions怎麽用?C# CodeGenerationOptions使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CodeGenerationOptions類屬於MonoDevelop.CodeGeneration命名空間,在下文中一共展示了CodeGenerationOptions類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: InitalizeSelection

		public IGenerateAction InitalizeSelection (CodeGenerationOptions options, Gtk.TreeView treeView)
		{
			PropertyGenerator.CreateProperty createProperty = new PropertyGenerator.CreateProperty (options);
			createProperty.ReadOnly = true;
			createProperty.Initialize (treeView);
			return createProperty;
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:7,代碼來源:ReadonlyPropertyGenerator.cs

示例2: PartialMethods

			public PartialMethods (CodeGenerationOptions options) : base (options)
			{
			}
開發者ID:Kalnor,項目名稱:monodevelop,代碼行數:3,代碼來源:PartialGenerator.cs

示例3: InitalizeSelection

		public IGenerateAction InitalizeSelection (CodeGenerationOptions options, Gtk.TreeView treeView)
		{
			OverrideMethods overrideMethods = new OverrideMethods (options);
			overrideMethods.Initialize (treeView);
			return overrideMethods;
		}
開發者ID:llucenic,項目名稱:monodevelop,代碼行數:6,代碼來源:ImplementInterfaceMembersGenerator.cs

示例4: CreateToString

			public CreateToString (CodeGenerationOptions options) : base (options)
			{
			}
開發者ID:Tak,項目名稱:monodevelop-novell,代碼行數:3,代碼來源:ToStringGenerator.cs

示例5: IsValid

		public bool IsValid (CodeGenerationOptions options)
		{
			return new CreateToString (options).IsValid ();
		}
開發者ID:Tak,項目名稱:monodevelop-novell,代碼行數:4,代碼來源:ToStringGenerator.cs

示例6: InitalizeSelection

		public IGenerateAction InitalizeSelection (CodeGenerationOptions options, Gtk.TreeView treeView)
		{
			var createEventMethod = new CreateEventMethod (options);
			createEventMethod.Initialize (treeView);
			return createEventMethod;
		}
開發者ID:FreeBSD-DotNet,項目名稱:monodevelop,代碼行數:6,代碼來源:RaiseEventMethodGenerator.cs

示例7: CreateCodeGenerationOptions

		public static CodeGenerationOptions CreateCodeGenerationOptions (Document document)
		{
			document.UpdateParseDocument ();
			var options = new CodeGenerationOptions {
				Document = document
			};
			if (document.ParsedDocument != null && document.ParsedDocument.ParsedFile != null) {
				options.EnclosingPart = document.ParsedDocument.ParsedFile.GetInnermostTypeDefinition (document.Editor.Caret.Location);
				if (options.EnclosingPart != null)
					options.EnclosingType = options.EnclosingPart.Resolve (document.Project).GetDefinition ();
				if (options.EnclosingType != null) {
					options.EnclosingMember = options.EnclosingType.Members.FirstOrDefault (m => !m.IsSynthetic && m.Region.FileName == document.FileName && m.Region.IsInside (document.Editor.Caret.Location));
				}
			}
			return options;
		}
開發者ID:telebovich,項目名稱:monodevelop,代碼行數:16,代碼來源:CodeGenerationOptions.cs

示例8: IsValid

		public bool IsValid (CodeGenerationOptions options)
		{
			return new CreateEquality (options).IsValid ();
		}
開發者ID:sandyarmstrong,項目名稱:monodevelop,代碼行數:4,代碼來源:EqualityMembersGenerator.cs

示例9: InitalizeSelection

		public IGenerateAction InitalizeSelection (CodeGenerationOptions options, Gtk.TreeView treeView)
		{
			CreateConstructor createConstructor = new CreateConstructor (options);
			createConstructor.Initialize (treeView);
			return createConstructor;
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:6,代碼來源:CreateConstructorGenerator.cs

示例10: IsValid

		public bool IsValid (CodeGenerationOptions options)
		{
			CreateConstructor createConstructor = new CreateConstructor (options);
			return createConstructor.IsValid ();
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:5,代碼來源:CreateConstructorGenerator.cs

示例11: ExportMethods

		IGenerateAction ICodeGenerator.InitalizeSelection (CodeGenerationOptions options, TreeView treeView)
		{
			var exportMethods = new ExportMethods (this, options);
			exportMethods.Initialize (treeView);
			return exportMethods;
		}
開發者ID:riverans,項目名稱:monodevelop,代碼行數:6,代碼來源:ExportCodeGenerator.cs

示例12: AbstractGenerateAction

		public AbstractGenerateAction (CodeGenerationOptions options)
		{
			this.options = options;
		}
開發者ID:yayanyang,項目名稱:monodevelop,代碼行數:4,代碼來源:AbstractGenerateAction.cs

示例13: GenerateCodeWindow

		GenerateCodeWindow (CodeGenerationOptions options, MonoDevelop.Ide.CodeCompletion.CodeCompletionContext completionContext) : base(Gtk.WindowType.Toplevel)
		{
			this.options = options;
			this.Build ();
			scrolledwindow1.Child = treeviewGenerateActions;
			scrolledwindow1.ShowAll ();
			
			scrolledwindow2.Child = treeviewSelection;
			scrolledwindow2.ShowAll ();
			
			treeviewGenerateActions.Cancel += delegate {
				Destroy ();
			};
			treeviewGenerateActions.Submit += delegate {
				treeviewSelection.GrabFocus ();
			};
			
			treeviewSelection.Cancel += delegate {
				treeviewGenerateActions.GrabFocus ();
			};
			
			treeviewSelection.Submit += delegate {
				if (curInitializeObject != null) {
					curInitializeObject.GenerateCode ();
					curInitializeObject = null;
				}
				Destroy ();
			};
			
			WindowTransparencyDecorator.Attach (this);
			
			treeviewSelection.HeadersVisible = false;
			
			treeviewGenerateActions.HeadersVisible = false;
			treeviewGenerateActions.Model = generateActionsStore;
			TreeViewColumn column = new TreeViewColumn ();
			var pixbufRenderer = new CellRendererImage ();
			column.PackStart (pixbufRenderer, false);
			column.AddAttribute (pixbufRenderer, "image", 0);
			
			CellRendererText textRenderer = new CellRendererText ();
			column.PackStart (textRenderer, true);
			column.AddAttribute (textRenderer, "text", 1);
			column.Expand = true;
			treeviewGenerateActions.AppendColumn (column);
			
			treeviewGenerateActions.Selection.Changed += TreeviewGenerateActionsSelectionChanged;
			this.Remove (this.vbox1);
			BorderBox messageArea = new BorderBox ();
			messageArea.Add (vbox1);
			this.Add (messageArea);
			this.ShowAll ();
			
			int x = completionContext.TriggerXCoord;
			int y = completionContext.TriggerYCoord;

			int w, h;
			GetSize (out w, out h);
			
			int myMonitor = Screen.GetMonitorAtPoint (x, y);
			Gdk.Rectangle geometry = DesktopService.GetUsableMonitorGeometry (Screen, myMonitor);

			if (x + w > geometry.Right)
				x = geometry.Right - w;

			if (y + h > geometry.Bottom)
				y = y - completionContext.TriggerTextHeight - h;
			
			Move (x, y);
		}
開發者ID:Kalnor,項目名稱:monodevelop,代碼行數:70,代碼來源:GenerateCodeWindow.cs

示例14: IsValid

		public bool IsValid (CodeGenerationOptions options)
		{
			return new CreateWriteLine (options).IsValid ();
		}
開發者ID:RainsSoft,項目名稱:playscript-monodevelop,代碼行數:4,代碼來源:WriteLineGenerator.cs

示例15: CreateWriteLine

			public CreateWriteLine (CodeGenerationOptions options) : base (options)
			{
			}
開發者ID:RainsSoft,項目名稱:playscript-monodevelop,代碼行數:3,代碼來源:WriteLineGenerator.cs


注:本文中的MonoDevelop.CodeGeneration.CodeGenerationOptions類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。