Example #1
0
		/// <summary>
		/// Constructs a new nHydrateDocView.
		/// </summary>
		public nHydrateDocView(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider)
			: base(docData, serviceProvider)
		{
		}
Example #2
0
		/// <summary>
		/// Save the given document that is subordinate to this document.
		/// </summary>
		/// <param name="subordinateDocument"></param>
		/// <param name="fileName"></param>
		protected override void SaveSubordinateFile(DslShell::DocData subordinateDocument, string fileName)
		{
			// In this case, the only subordinate is the diagram.
			DslModeling::SerializationResult serializationResult = new DslModeling::SerializationResult();

			global::System.Collections.Generic.IList<DslDiagrams::PresentationElement> diagrams = DslDiagrams::PresentationViewsSubject.GetPresentation(this.RootElement);
			if (diagrams.Count > 0)
			{
				global::Microsoft.Practices.ServiceFactory.DataContracts.DataContractDiagram diagram = diagrams[0] as global::Microsoft.Practices.ServiceFactory.DataContracts.DataContractDiagram;
				if (diagram != null)
				{
					try
					{
						this.SuspendFileChangeNotification(fileName);
						
						global::Microsoft.Practices.ServiceFactory.DataContracts.DataContractDslSerializationHelper.Instance.SaveDiagram(serializationResult, diagram, fileName, this.Encoding, false);
					}
					finally
					{
						this.ResumeFileChangeNotification(fileName);
					}
				}
			}
			// Report serialization messages.
			this.SuspendErrorListRefresh();
			try
			{
				foreach (DslModeling::SerializationMessage serializationMessage in serializationResult)
				{
					this.AddErrorListItem(new DslShell::SerializationErrorListItem(this.ServiceProvider, serializationMessage));
				}
			}
			finally
			{
				this.ResumeErrorListRefresh();
			}
			
			if (!serializationResult.Failed)
			{
				this.NotifySubordinateDocumentSaved(subordinateDocument.FileName, fileName);
			}
			else
			{	
				// Save failed.
				throw new global::System.InvalidOperationException(global::Microsoft.Practices.ServiceFactory.DataContracts.DataContractDslDomainModel.SingletonResourceManager.GetString("CannotSaveDocument"));
			}						
		}
Example #3
0
		/// <summary>
		/// Constructs a new SqlMapperMappingDocView.
		/// </summary>
		protected SqlMapperMappingDocViewBase(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider) : base(docData, serviceProvider)
		{
		}
Example #4
0
		/// <summary>
		/// Constructs a new ScheduledTasksDocView.
		/// </summary>
		protected ScheduledTasksDocViewBase(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider) : base(docData, serviceProvider)
		{
		}
Example #5
0
		/// <summary>
		/// Constructs a new CloudCoreArchitectProcessOverviewDocView.
		/// </summary>
		protected CloudCoreArchitectProcessOverviewDocViewBase(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider) : base(docData, serviceProvider)
		{
		}
		/// <summary>
		/// Constructs a new DSLBootstrapDocView.
		/// </summary>
		protected DSLBootstrapDocViewBase(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider) : base(docData, serviceProvider)
		{
		}
Example #7
0
		/// <summary>
		/// Constructs a new DataContractDslDocView.
		/// </summary>
		protected DataContractDslDocViewBase(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider) : base(docData, serviceProvider)
		{
		}
Example #8
0
		/// <summary>
		/// Constructs a new ActiveWriterDocView.
		/// </summary>
		protected ActiveWriterDocViewBase(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider) : base(docData, serviceProvider)
		{
		}
Example #9
0
		/// <summary>
		/// Constructs a new WorkflowDesignDocView.
		/// </summary>
		protected WorkflowDesignDocViewBase(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider) : base(docData, serviceProvider)
		{
		}
Example #10
0
		/// <summary>
		/// Constructs a new CloudCoreArchitectSubProcessDocView.
		/// </summary>
		public CloudCoreArchitectSubProcessDocView(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider)
			: base(docData, serviceProvider)
		{
		}
Example #11
0
		/// <summary>
		/// Constructs a new HostDesignerDocView.
		/// </summary>
		public HostDesignerDocView(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider)
			: base(docData, serviceProvider)
		{
		}
		/// <summary>
		/// Constructs a new LanguageDSLDocView.
		/// </summary>
		public LanguageDSLDocView(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider)
			: base(docData, serviceProvider)
		{
		}
Example #13
0
		/// <summary>
		/// Constructs a new ServiceContractDslDocView.
		/// </summary>
		public ServiceContractDslDocView(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider)
			: base(docData, serviceProvider)
		{
		}
Example #14
0
		/// <summary>
		/// Constructs a new FeatureModelDSLDocView.
		/// </summary>
		protected FeatureModelDSLDocViewBase(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider) : base(docData, serviceProvider)
		{
		}
Example #15
0
		/// <summary>
		/// Constructs a new nHydrate2DocView.
		/// </summary>
		protected nHydrate2DocViewBase(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider) : base(docData, serviceProvider)
		{
		}
Example #16
0
		/// <summary>
		/// Constructs a new OrmLanguageDocView.
		/// </summary>
		protected OrmLanguageDocViewBase(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider) : base(docData, serviceProvider)
		{
		}
Example #17
0
		/// <summary>
		/// Save the given document that is subordinate to this document.
		/// </summary>
		/// <param name="subordinateDocument"></param>
		/// <param name="fileName"></param>
		protected override void SaveSubordinateFile(DslShell::DocData subordinateDocument, string fileName)
		{
			// In this case, the only subordinate is the diagram.
			DslModeling::SerializationResult serializationResult = new DslModeling::SerializationResult();

			global::System.Collections.Generic.IList<DslDiagrams::PresentationElement> diagrams = DslDiagrams::PresentationViewsSubject.GetPresentation(this.RootElement);
			if (diagrams.Count > 0)
			{
				global::LinqToRdf.Design.ClassDiagram diagram = diagrams[0] as global::LinqToRdf.Design.ClassDiagram;
				if (diagram != null)
				{
					try
					{
						this.SuspendFileChangeNotification(fileName);
						
						global::LinqToRdf.Design.LinqToRdfSerializationHelper.Instance.SaveDiagram(serializationResult, diagram, fileName, this.Encoding, false);
					}
					finally
					{
						this.ResumeFileChangeNotification(fileName);
					}
				}
			}
			// Report serialization messages.
			this.SuspendErrorListRefresh();
			try
			{
				foreach (DslModeling::SerializationMessage serializationMessage in serializationResult)
				{
					this.AddErrorListItem(new DslShell::SerializationErrorListItem(this.ServiceProvider, serializationMessage));
				}
			}
			finally
			{
				this.ResumeErrorListRefresh();
			}
			
			if (!serializationResult.Failed)
			{
				// Notify the Running Document Table that the subordinate has been saved
				if (this.ServiceProvider != null)
				{
					VSShellInterop::IVsRunningDocumentTable rdt = (VSShellInterop.IVsRunningDocumentTable)this.ServiceProvider.GetService(typeof(VSShellInterop::IVsRunningDocumentTable));
					if (rdt != null && this.diagramDocumentLockHolder != null && this.diagramDocumentLockHolder.SubordinateDocData != null)
					{
						global::Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(rdt.NotifyOnAfterSave(this.diagramDocumentLockHolder.SubordinateDocData.Cookie));
					}
				}
			}
			else
			{	
				// Save failed.
				throw new global::System.InvalidOperationException(global::LinqToRdf.Design.LinqToRdfDomainModel.SingletonResourceManager.GetString("CannotSaveDocument"));
			}						
		}
Example #18
0
		/// <summary>
		/// Constructs a new MicrosoftDataEntityDesignDocView.
		/// </summary>
		protected MicrosoftDataEntityDesignDocViewBase(DslShell::ModelingDocData docData, global::System.IServiceProvider serviceProvider) : base(docData, serviceProvider)
		{
		}