src/Misc/EFTools/EntityDesignEntityDesigner/GeneratedCode/Serializer.cs
/// <summary>
/// Saves the given model root to the given file, with specified encoding.
/// </summary>
/// <param name="serializationResult">Stores serialization result from the save operation.</param>
/// <param name="modelRoot">global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel instance to be saved.</param>
/// <param name="fileName">Name of the file in which the global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel instance will be saved.</param>
/// <param name="encoding">Encoding to use when saving the global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel instance.</param>
Saves the given model root to the given file, with specified encoding.
Saves the given model root to the given file with specified encoding .
public void SaveModel(DslModeling::SerializationResult serializationResult, 
			DslModeling::ModelElement modelRoot, 
			string fileName, 
			System.Text.Encoding encoding)
		{
			if (serializationResult == null) { throw new global::System.ArgumentNullException("serializationResult"); }
			if (modelRoot == null) { throw new global::System.ArgumentNullException("modelRoot"); }
			if (string.IsNullOrEmpty("fileName")) { throw new global::System.ArgumentNullException("fileName"); }
			global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel rootElement = modelRoot as global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel;
			if (rootElement == null)
			{
				string errorMessage = string.Format(global::System.Globalization.CultureInfo.CurrentCulture,
					global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager.GetString("InvalidSaveRootElementType"),
					modelRoot.GetType().ToString());
				throw new global::System.ArgumentException(errorMessage, "modelRoot");
			}
			MicrosoftDataEntityDesignSerializationHelper.Instance.SaveModel(serializationResult, rootElement, fileName,encoding, true);
		}
public void SaveModel ( DslModeling :: SerializationResult serializationResult , DslModeling :: ModelElement modelRoot , string fileName , System . Text . Encoding encoding ) { if ( serializationResult == null ) { throw new global :: System . ArgumentNullException ( " " ) ; } if ( modelRoot == null ) { throw new global :: System . ArgumentNullException ( " " ) ; } if ( string . IsNullOrEmpty ( " " ) ) { throw new global :: System . ArgumentNullException ( " " ) ; } global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityDesignerViewModel rootElement = modelRoot as global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityDesignerViewModel ; if ( rootElement == null ) { string errorMessage = string . Format ( global :: System . Globalization . CultureInfo . CurrentCulture , global :: Microsoft . Data . Entity . Design . EntityDesigner . MicrosoftDataEntityDesignDomainModel . SingletonResourceManager . GetString ( " " ) , modelRoot . GetType ( ) . ToString ( ) ) ; throw new global :: System . ArgumentException ( errorMessage , " " ) ; } MicrosoftDataEntityDesignSerializationHelper . Instance . SaveModel ( serializationResult , rootElement , fileName , encoding , true ) ; }
Saves the given model root to the given file, with specified encoding.
Saves the given model root to the given file with specified encoding .
serializationResult
DslModeling::SerializationResult
Stores serialization result from the save operation.
Stores serialization result from the save operation .
modelRoot
DslModeling::ModelElement
:Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel instance to be saved.
: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityDesignerViewModel instance to be saved .
fileName
string
Name of the file in which the global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel instance will be saved.
Name of the file in which the global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityDesignerViewModel instance will be saved .
encoding
System.Text.Encoding
Encoding to use when saving the global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel instance.
Encoding to use when saving the global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityDesignerViewModel instance .