C# Class nHydrate.DslPackage.nHydrateDocDataBase

Class which represents a nHydrate document in memory.
Inheritance: DslShell::ModelingDocData
Mostrar archivo Open project: nHydrate/nHydrate Class Usage Examples

Protected Properties

Property Type Description
diagramDocumentLockHolder DslShell::SubordinateDocumentLockHolder
diagramPartitionId global::System.Guid

Public Methods

Method Description
Initialize ( global::Microsoft.VisualStudio.Modeling sharedStore ) : void

Initialize the doc data

MarkDocumentChangedForBackup ( ) : void

Mark that the document has changed and thus a new backup should be created

Call this method when you change the document's content

Protected Methods

Method Description
CreateExtensionLocator ( ) : DslModeling::IExtensionLocator

Factory method to create an ExtensionLocator.

CreateSerializerLocator ( ) : DslModeling::ISerializerLocator

Factory method to create a SerializerLocator.

CreateStore ( ) : DslModeling::Store

Create and return a new store

Override the default behaviour to put the doc data's composition container into the store's property bag. By default, the runtime will add the CompositionService from the DslShell ModelingCompositionContainer if the property has not already been set.

CreateValidationController ( ) : DslShell::VsValidationController

Factory method to create a VSValidationController.

Dispose ( bool disposing ) : void

When the doc data is closed, make sure we reset the valiation messages (if there's any) from the ErrorList window.

GetDiagramPartition ( ) : DslModeling::Partition

Get the Partition where diagram data will be loaded into. Base implementation returns the default partition of the store.

GetDomainModels ( ) : global::System.Collections.Generic.IList

Returns a collection of domain models to load into the store.

The default implementation includes any extension domain models returned by the call to GetExtensionDomainModels().

GetExtensionDomainModels ( ) : global::System.Collections.Generic.IEnumerable

Returns the list of extension domain models to be loaded

This method is called by "GetDomainModels", which aggregates the returned lists.

GetModelPartition ( ) : DslModeling::Partition

Get the Partition where model data will be loaded into. Base implementation returns the default partition of the store.

HandleBindingFailure ( global exception ) : bool

Handles exceptions that occurred during binding.

If the exception is not handled (i.e. the method returns false), it will be re-thrown by the calling method. This method will be called for all types of exception.

InitializeComposition ( ) : void

Satisfy Imports in DocData object

Load ( string fileName, bool isReload ) : void

Loads the given file.

NotifySubordinateDocumentSaved ( string oldFileName, string newFileName ) : void

Notify the RDT that the sub-ordinate document has been saved, assuming saved to the same file as registered in the RDT

OnDocumentLoaded ( ) : void

Called on both document load and reload.

OnDocumentLoaded ( global e ) : void

Called after the document is opened.

OnDocumentReloaded ( global e ) : void

Called after the document is reloaded.

OnDocumentSaved ( global e ) : void

Handle when document has been saved

Save ( string fileName ) : void

Saves the given file.

SaveSubordinateFile ( global::Microsoft.VisualStudio.Modeling.Shell subordinateDocument, string fileName ) : void

Save the given document that is subordinate to this document.

nHydrateDocDataBase ( global serviceProvider, global editorFactoryId ) : global::System.Linq

Constructs a new nHydrateDocDataBase.

Private Methods

Method Description
SetValidationExtensionRegistrar ( global::Microsoft.VisualStudio.Modeling.Validation validationController ) : void

Add ValidationExtensionRegistrar to the ValidationController and handle related MEF Initialization operations

Method Details

CreateExtensionLocator() protected method

Factory method to create an ExtensionLocator.
protected CreateExtensionLocator ( ) : DslModeling::IExtensionLocator
return DslModeling::IExtensionLocator

CreateSerializerLocator() protected method

Factory method to create a SerializerLocator.
protected CreateSerializerLocator ( ) : DslModeling::ISerializerLocator
return DslModeling::ISerializerLocator

CreateStore() protected method

Create and return a new store
Override the default behaviour to put the doc data's composition container into the store's property bag. By default, the runtime will add the CompositionService from the DslShell ModelingCompositionContainer if the property has not already been set.
protected CreateStore ( ) : DslModeling::Store
return DslModeling::Store

CreateValidationController() protected method

Factory method to create a VSValidationController.
protected CreateValidationController ( ) : DslShell::VsValidationController
return DslShell::VsValidationController

Dispose() protected method

When the doc data is closed, make sure we reset the valiation messages (if there's any) from the ErrorList window.
protected Dispose ( bool disposing ) : void
disposing bool
return void

GetDiagramPartition() protected method

Get the Partition where diagram data will be loaded into. Base implementation returns the default partition of the store.
protected GetDiagramPartition ( ) : DslModeling::Partition
return DslModeling::Partition

GetDomainModels() protected method

Returns a collection of domain models to load into the store.
The default implementation includes any extension domain models returned by the call to GetExtensionDomainModels().
protected GetDomainModels ( ) : global::System.Collections.Generic.IList
return global::System.Collections.Generic.IList

GetExtensionDomainModels() protected method

Returns the list of extension domain models to be loaded
This method is called by "GetDomainModels", which aggregates the returned lists.
protected GetExtensionDomainModels ( ) : global::System.Collections.Generic.IEnumerable
return global::System.Collections.Generic.IEnumerable

GetModelPartition() protected method

Get the Partition where model data will be loaded into. Base implementation returns the default partition of the store.
protected GetModelPartition ( ) : DslModeling::Partition
return DslModeling::Partition

HandleBindingFailure() protected method

Handles exceptions that occurred during binding.
If the exception is not handled (i.e. the method returns false), it will be re-thrown by the calling method. This method will be called for all types of exception.
protected HandleBindingFailure ( global exception ) : bool
exception global The exception that occured
return bool

Initialize() public method

Initialize the doc data
public Initialize ( global::Microsoft.VisualStudio.Modeling sharedStore ) : void
sharedStore global::Microsoft.VisualStudio.Modeling
return void

InitializeComposition() protected method

Satisfy Imports in DocData object
protected InitializeComposition ( ) : void
return void

Load() protected method

Loads the given file.
protected Load ( string fileName, bool isReload ) : void
fileName string
isReload bool
return void

MarkDocumentChangedForBackup() public method

Mark that the document has changed and thus a new backup should be created
Call this method when you change the document's content
public MarkDocumentChangedForBackup ( ) : void
return void

NotifySubordinateDocumentSaved() protected method

Notify the RDT that the sub-ordinate document has been saved, assuming saved to the same file as registered in the RDT
protected NotifySubordinateDocumentSaved ( string oldFileName, string newFileName ) : void
oldFileName string
newFileName string
return void

OnDocumentLoaded() protected method

Called on both document load and reload.
protected OnDocumentLoaded ( ) : void
return void

OnDocumentLoaded() protected method

Called after the document is opened.
protected OnDocumentLoaded ( global e ) : void
e global Event Args.
return void

OnDocumentReloaded() protected method

Called after the document is reloaded.
protected OnDocumentReloaded ( global e ) : void
e global
return void

OnDocumentSaved() protected method

Handle when document has been saved
protected OnDocumentSaved ( global e ) : void
e global
return void

Save() protected method

Saves the given file.
protected Save ( string fileName ) : void
fileName string
return void

SaveSubordinateFile() protected method

Save the given document that is subordinate to this document.
protected SaveSubordinateFile ( global::Microsoft.VisualStudio.Modeling.Shell subordinateDocument, string fileName ) : void
subordinateDocument global::Microsoft.VisualStudio.Modeling.Shell
fileName string
return void

nHydrateDocDataBase() protected method

Constructs a new nHydrateDocDataBase.
protected nHydrateDocDataBase ( global serviceProvider, global editorFactoryId ) : global::System.Linq
serviceProvider global
editorFactoryId global
return global::System.Linq

Property Details

diagramDocumentLockHolder protected_oe property

Document lock holder registered for the subordinate .diagram file.
protected DslShell::SubordinateDocumentLockHolder diagramDocumentLockHolder
return DslShell::SubordinateDocumentLockHolder

diagramPartitionId protected_oe property

Id of the partition that contains diagram elements.
protected global::System.Guid diagramPartitionId
return global::System.Guid