//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using DslModeling = global::Microsoft.VisualStudio.Modeling;
using DslDesign = global::Microsoft.VisualStudio.Modeling.Design;
using DslDiagrams = global::Microsoft.VisualStudio.Modeling.Diagrams;

namespace Microsoft.Data.Entity.Design.EntityDesigner.View
{
	/// <summary>
	/// Double-derived base class for DomainClass EntityTypeShape
	/// </summary>
	[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.View.EntityTypeShape.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.View.EntityTypeShape.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel))]
	[DslModeling::DomainObjectId("b1385551-bc3f-4f60-8722-75d686a8f8f6")]
	internal abstract partial class EntityTypeShapeBase : DslDiagrams::CompartmentShape
	{
		#region DiagramElement boilerplate
		private static DslDiagrams::StyleSet classStyleSet;
		private static global::System.Collections.Generic.IList<DslDiagrams::ShapeField> shapeFields;
		private static global::System.Collections.Generic.IList<DslDiagrams::Decorator> decorators;
		
		/// <summary>
		/// Per-class style set for this shape.
		/// </summary>
		protected override DslDiagrams::StyleSet ClassStyleSet
		{
			get
			{
				if (classStyleSet == null)
				{
					classStyleSet = CreateClassStyleSet();
				}
				return classStyleSet;
			}
		}
		
		/// <summary>
		/// Per-class ShapeFields for this shape.
		/// </summary>
		public override global::System.Collections.Generic.IList<DslDiagrams::ShapeField> ShapeFields
		{
			get
			{
				if (shapeFields == null)
				{
					shapeFields = CreateShapeFields();
				}
				return shapeFields;
			}
		}
		
		/// <summary>
		/// Event fired when decorator initialization is complete for this shape type.
		/// </summary>
		public static event global::System.EventHandler DecoratorsInitialized;
		
		/// <summary>
		/// List containing decorators used by this type.
		/// </summary>
		public override global::System.Collections.Generic.IList<DslDiagrams::Decorator> Decorators
		{
			get 
			{
				if(decorators == null)
				{
					decorators = CreateDecorators();
					
					// fire this event to allow the diagram to initialize decorator mappings for this shape type.
					if(DecoratorsInitialized != null)
					{
						DecoratorsInitialized(this, global::System.EventArgs.Empty);
					}
				}
				
				return decorators; 
			}
		}
		
		/// <summary>
		/// Finds a decorator associated with EntityTypeShape.
		/// </summary>
		public static DslDiagrams::Decorator FindEntityTypeShapeDecorator(string decoratorName)
		{	
			if(decorators == null) return null;
			return DslDiagrams::ShapeElement.FindDecorator(decorators, decoratorName);
		}
		
		
		/// <summary>
		/// Shape instance initialization.
		/// </summary>
		public override void OnInitialize()
		{
			base.OnInitialize();
			
			// Create host shapes for outer decorators.
			foreach(DslDiagrams::Decorator decorator in this.Decorators)
			{
				if(decorator.RequiresHost)
				{
					decorator.ConfigureHostShape(this);
				}
			}
			
		}
		#endregion
		#region Shape size
		
		/// <summary>
		/// Default size for this shape.
		/// </summary>
		public override DslDiagrams::SizeD DefaultSize
		{
			get
			{
				return new DslDiagrams::SizeD(1.5, 0.4);
			}
		}
		#endregion
		#region Shape styles
		/// <summary>
		/// Initializes style set resources for this shape type
		/// </summary>
		/// <param name="classStyleSet">The style set for this shape class</param>
		protected override void InitializeResources(DslDiagrams::StyleSet classStyleSet)
		{
			base.InitializeResources(classStyleSet);
			
			// Outline pen settings for this shape.
			DslDiagrams::PenSettings outlinePen = new DslDiagrams::PenSettings();
			outlinePen.Color = global::System.Drawing.Color.FromArgb(255, 24, 143, 222);
			outlinePen.Width = 0.01F;
			classStyleSet.OverridePen(DslDiagrams::DiagramPens.ShapeOutline, outlinePen);
			// Fill brush settings for this shape.
			DslDiagrams::BrushSettings backgroundBrush = new DslDiagrams::BrushSettings();
			backgroundBrush.Color = global::System.Drawing.Color.FromArgb(255, 0, 122, 204);
			classStyleSet.OverrideBrush(DslDiagrams::DiagramBrushes.ShapeBackground, backgroundBrush);
		
			// Custom font styles
			DslDiagrams::FontSettings fontSettings;
			fontSettings = new DslDiagrams::FontSettings();
			fontSettings.Style =  global::System.Drawing.FontStyle.Bold ;
			fontSettings.Size = 8/72.0F;
			classStyleSet.AddFont(new DslDiagrams::StyleSetResourceId(string.Empty, "ShapeTextBold8"), DslDiagrams::DiagramFonts.ShapeText, fontSettings);
		}
		
		/// <summary>
		/// Indicates whether this shape displays a background gradient.
		/// </summary>
		public override bool HasBackgroundGradient
		{
			get
			{
				return false;
			}
		}
		#endregion
		#region Custom storage for shape properties that appear in the property grid
		/// <summary>
		/// Custom storage for domain property FillColor.
		/// </summary>
		private global::System.Drawing.Color GetFillColorValue()
		{
			DslDiagrams::BrushSettings settings = this.StyleSet.GetOverriddenBrushSettings(DslDiagrams::DiagramBrushes.ShapeBackground);
			if(settings != null && settings.IsOverridden(DslDiagrams::BrushSettingsFlags.Color))
			{
				return settings.Color;
			}
			return global::System.Drawing.Color.FromArgb(255, 0, 122, 204);
		}
		
		/// <summary>
		/// Custom storage for domain property FillColor.
		/// </summary>
		private void SetFillColorValue(global::System.Drawing.Color newValue)
		{
			DslDiagrams::BrushSettings settings = this.StyleSet.GetOverriddenBrushSettings(DslDiagrams::DiagramBrushes.ShapeBackground);
			if(settings == null) settings = new DslDiagrams::BrushSettings();
			settings.Color = newValue;
			this.StyleSet.OverrideBrush(DslDiagrams::DiagramBrushes.ShapeBackground, settings);
			this.Invalidate();
		}
		
		#endregion
		#region Decorators
		/// <summary>
		/// Initialize the collection of shape fields associated with this shape type.
		/// </summary>
		protected override void InitializeShapeFields(global::System.Collections.Generic.IList<DslDiagrams::ShapeField> shapeFields)
		{
			base.InitializeShapeFields(shapeFields);
			DslDiagrams::ChevronButtonField field1 = new DslDiagrams::ChevronButtonField("ExpandCollapse");
			field1.DefaultSelectable = false;
			field1.DefaultFocusable = false;
			shapeFields.Add(field1);
			
			DslDiagrams::TextField field2 = new DslDiagrams::TextField("BaseTypeName");
			field2.DefaultText = global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager.GetString("EntityTypeShapeBaseTypeNameDefaultText");
			field2.DefaultFocusable = true;
			field2.DefaultAutoSize = true;
			field2.AnchoringBehavior.MinimumHeightInLines = 1;
			field2.AnchoringBehavior.MinimumWidthInCharacters = 1;
			field2.DefaultAccessibleState = global::System.Windows.Forms.AccessibleStates.Invisible;
			shapeFields.Add(field2);
			
			DslDiagrams::ImageField field3 = new DslDiagrams::ImageField("IconDecorator");
			field3.DefaultImage = DslDiagrams::ImageHelper.GetImage(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager.GetObject("EntityTypeShapeIconDecoratorDefaultImage"));
			shapeFields.Add(field3);
			
			DslDiagrams::TextField field4 = new DslDiagrams::TextField("Name");
			field4.DefaultText = global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager.GetString("EntityTypeShapeNameDefaultText");
			field4.DefaultFocusable = true;
			field4.DefaultAutoSize = true;
			field4.AnchoringBehavior.MinimumHeightInLines = 1;
			field4.AnchoringBehavior.MinimumWidthInCharacters = 1;
			field4.DefaultAccessibleState = global::System.Windows.Forms.AccessibleStates.Invisible;
			field4.DefaultFontId = new DslDiagrams::StyleSetResourceId(string.Empty, "ShapeTextBold8");			
			shapeFields.Add(field4);
			
			DslDiagrams::ImageField field5 = new DslDiagrams::ImageField("BaseTypeIconDecorator");
			field5.DefaultImage = DslDiagrams::ImageHelper.GetImage(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager.GetObject("EntityTypeShapeBaseTypeIconDecoratorDefaultImage"));
			shapeFields.Add(field5);
			
		}
		
		/// <summary>
		/// Initialize the collection of decorators associated with this shape type.  This method also
		/// creates shape fields for outer decorators, because these are not part of the shape fields collection
		/// associated with the shape, so they must be created here rather than in InitializeShapeFields.
		/// </summary>
		protected override void InitializeDecorators(global::System.Collections.Generic.IList<DslDiagrams::ShapeField> shapeFields, global::System.Collections.Generic.IList<DslDiagrams::Decorator> decorators)
		{
			base.InitializeDecorators(shapeFields, decorators);
			
			DslDiagrams::ShapeField field1 = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "ExpandCollapse");
			DslDiagrams::Decorator decorator1 = new DslDiagrams::ExpandCollapseDecorator(this.Store, (DslDiagrams::ToggleButtonField)field1, DslDiagrams::ShapeDecoratorPosition.InnerTopRight, DslDiagrams::PointD.Empty);
			decorators.Add(decorator1);
				
			DslDiagrams::ShapeField field2 = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "BaseTypeName");
			DslDiagrams::Decorator decorator2 = new DslDiagrams::ShapeDecorator(field2, DslDiagrams::ShapeDecoratorPosition.InnerTopLeft, new DslDiagrams::PointD(0.4, 0.125));
			decorators.Add(decorator2);
				
			DslDiagrams::ShapeField field3 = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "IconDecorator");
			DslDiagrams::Decorator decorator3 = new DslDiagrams::ShapeDecorator(field3, DslDiagrams::ShapeDecoratorPosition.InnerTopLeft, DslDiagrams::PointD.Empty);
			decorators.Add(decorator3);
				
			DslDiagrams::ShapeField field4 = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "Name");
			DslDiagrams::Decorator decorator4 = new DslDiagrams::ShapeDecorator(field4, DslDiagrams::ShapeDecoratorPosition.InnerTopLeft, new DslDiagrams::PointD(0.25, 0));
			decorators.Add(decorator4);
				
			DslDiagrams::ShapeField field5 = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "BaseTypeIconDecorator");
			DslDiagrams::Decorator decorator5 = new DslDiagrams::ShapeDecorator(field5, DslDiagrams::ShapeDecoratorPosition.InnerTopLeft, new DslDiagrams::PointD(0.25, 0.125));
			decorators.Add(decorator5);
				
		}
		
		/// <summary>
		/// Ensure outer decorators are placed appropriately.  This is called during view fixup,
		/// after the shape has been associated with the model element.
		/// </summary>
		public override void OnBoundsFixup(DslDiagrams::BoundsFixupState fixupState, int iteration, bool createdDuringViewFixup)
		{
			base.OnBoundsFixup(fixupState, iteration, createdDuringViewFixup);
			
			if(iteration == 0)
			{
				foreach(DslDiagrams::Decorator decorator in this.Decorators)
				{
					if(decorator.RequiresHost)
					{
						decorator.RepositionHostShape(decorator.GetHostShape(this));
					}
				}
			}
		}
		#endregion
		#region CompartmentShape code
		/// <summary>
		/// Returns a value indicating whether compartment header should be visible if there is only one of them.
		/// </summary>
		public override bool IsSingleCompartmentHeaderVisible
		{
			get { return true; }
		}
		
		private static DslDiagrams::CompartmentDescription[] compartmentDescriptions;
		
		/// <summary>
		/// Gets an array of CompartmentDescription for all compartments shown on this shape
		/// (including compartments defined on base shapes).
		/// </summary>
		/// <returns></returns>
		public override DslDiagrams::CompartmentDescription[] GetCompartmentDescriptions()
		{
			if(compartmentDescriptions == null)
			{
				// Initialize the array of compartment descriptions if we haven't done so already. 
				// First we get any compartment descriptions in base shapes, and add on any compartments
				// that are defined on this shape. 
				DslDiagrams::CompartmentDescription[] baseCompartmentDescriptions = base.GetCompartmentDescriptions();
				
				int localCompartmentsOffset = 0;
				if(baseCompartmentDescriptions!=null)
				{
					localCompartmentsOffset = baseCompartmentDescriptions.Length;
				}
				compartmentDescriptions = new DslDiagrams::ElementListCompartmentDescription[2+localCompartmentsOffset];
				
				if(baseCompartmentDescriptions!=null)
				{
					baseCompartmentDescriptions.CopyTo(compartmentDescriptions, 0);	
				}
				{
					string title = global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager.GetString("EntityTypeShapePropertiesTitle");
					DslDiagrams::ElementListCompartmentDescription descriptor = new DslDiagrams::ElementListCompartmentDescription("Properties", title, 
						global::System.Drawing.Color.FromKnownColor(global::System.Drawing.KnownColor.Gainsboro), false, 
						global::System.Drawing.Color.FromKnownColor(global::System.Drawing.KnownColor.WhiteSmoke), false,
						null, null,
						false);
					compartmentDescriptions[localCompartmentsOffset+0] = descriptor;
				}
				{
					string title = global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager.GetString("EntityTypeShapeNavigationTitle");
					DslDiagrams::ElementListCompartmentDescription descriptor = new DslDiagrams::ElementListCompartmentDescription("Navigation", title, 
						global::System.Drawing.Color.FromKnownColor(global::System.Drawing.KnownColor.Gainsboro), false, 
						global::System.Drawing.Color.FromKnownColor(global::System.Drawing.KnownColor.WhiteSmoke), false,
						null, null,
						false);
					compartmentDescriptions[localCompartmentsOffset+1] = descriptor;
				}
			}
			
			return EntityTypeShape.compartmentDescriptions;
		}
		
		private static global::System.Collections.Generic.Dictionary<global::System.Type, DslDiagrams::CompartmentMapping[]> compartmentMappings;
		
		/// <summary>
		/// Gets an array of CompartmentMappings for all compartments displayed on this shape
		/// (including compartment maps defined on base shapes). 
		/// </summary>
		/// <param name="melType">The type of the DomainClass that this shape is mapped to</param>
		/// <returns></returns>
		protected override DslDiagrams::CompartmentMapping[] GetCompartmentMappings(global::System.Type melType)
		{
			if(melType==null) throw new global::System.ArgumentNullException("melType");
			
			if(compartmentMappings==null)
			{
				// Initialize the table of compartment mappings if we haven't done so already. 
				// The table contains an array of CompartmentMapping for every Type that this
				// shape can be mapped to. 
				compartmentMappings = new global::System.Collections.Generic.Dictionary<global::System.Type, DslDiagrams::CompartmentMapping[]>();
				{
					// First we get the mappings defined for the base shape, and add on any mappings defined for this
					// shape. 
					DslDiagrams::CompartmentMapping[] baseMappings = base.GetCompartmentMappings(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType));
					int localCompartmentMappingsOffset = 0;
					if(baseMappings!=null)
					{
						localCompartmentMappingsOffset = baseMappings.Length;
					}
					DslDiagrams::CompartmentMapping[] mappings = new DslDiagrams::CompartmentMapping[2+localCompartmentMappingsOffset];
					
					if(baseMappings!=null)
					{
						baseMappings.CopyTo(mappings, 0);
					}
					mappings[localCompartmentMappingsOffset+0] = new DslDiagrams::ElementListCompartmentMapping(
																				"Navigation", 
																				global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NameableItem.NameDomainPropertyId, 
																				global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NavigationProperty.DomainClassId, 
																				GetElementsFromEntityTypeForNavigation,
																				null,
																				null,
																				null);
					////////
					// CompartmentMap.DisplaysCustomString == true
					// Please provide the following method to get the string to be
					// displayed in the compartment list: 
					//
					// static string GetDisplayPropertyFromEntityTypeForProperties(DslModeling::ModelElement element)
					////////
					mappings[localCompartmentMappingsOffset+1] = new DslDiagrams::ElementListCompartmentMapping(
																				"Properties", 
																				global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NameableItem.NameDomainPropertyId, 
																				global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Property.DomainClassId, 
																				GetElementsFromEntityTypeForProperties,
																				null,
																				GetDisplayPropertyFromEntityTypeForProperties,	// This method needs to be provided. Please see comment-block above.
																				null);
					compartmentMappings.Add(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType), mappings);
				}
			}
			
			// See if we can find the mapping being requested directly in the table. 
			DslDiagrams::CompartmentMapping[] returnValue;
			if(compartmentMappings.TryGetValue(melType, out returnValue))
			{
				return returnValue;
			}
			
			// If not, loop through the types in the table, and find the 'most derived' base
			// class of melType. 
			global::System.Type selectedMappedType = null;
			foreach(global::System.Type mappedType in compartmentMappings.Keys)
			{
				if(mappedType.IsAssignableFrom(melType) && (selectedMappedType==null || selectedMappedType.IsAssignableFrom(mappedType)))
				{
					selectedMappedType = mappedType;
				}
			}
			if(selectedMappedType!=null)
			{
				return compartmentMappings[selectedMappedType];
			}
			return new DslDiagrams::CompartmentMapping[] {};
		}
		
			#region DomainPath traversal methods to get the list of elements to display in a compartment.
			internal static global::System.Collections.IList GetElementsFromEntityTypeForNavigation(DslModeling::ModelElement element)
			{
				global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType root = (global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType)element;
					// Segments 0 and 1
					DslModeling::LinkedElementCollection<global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NavigationProperty> result = root.NavigationProperties;
				return result;
			}
			internal static global::System.Collections.IList GetElementsFromEntityTypeForProperties(DslModeling::ModelElement element)
			{
				global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType root = (global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType)element;
					// Segments 0 and 1
					DslModeling::LinkedElementCollection<global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Property> result = root.Properties;
				return result;
			}
			#endregion
		
		#endregion
		#region Constructors, domain class Id
	
		/// <summary>
		/// EntityTypeShape domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0xb1385551, 0xbc3f, 0x4f60, 0x87, 0x22, 0x75, 0xd6, 0x86, 0xa8, 0xf8, 0xf6);
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="partition">Partition where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		protected EntityTypeShapeBase(DslModeling::Partition partition, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, propertyAssignments)
		{
		}
		#endregion
		#region FillColor domain property code
		
		/// <summary>
		/// FillColor domain property Id.
		/// </summary>
		public static readonly global::System.Guid FillColorDomainPropertyId = new global::System.Guid(0x590355a5, 0x1c6e, 0x4dc8, 0xaf, 0x7f, 0x51, 0x20, 0x9c, 0x2f, 0xa2, 0x59);
		
		/// <summary>
		/// Gets or sets the value of FillColor domain property.
		/// Description for
		/// Microsoft.Data.Entity.Design.EntityDesigner.View.EntityTypeShape.Fill Color
		/// </summary>
		[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.View.EntityTypeShape/FillColor.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.View.EntityTypeShape/FillColor.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainProperty(Kind = DslModeling::DomainPropertyKind.CustomStorage)]
		[DslModeling::DomainObjectId("590355a5-1c6e-4dc8-af7f-51209c2fa259")]
		public global::System.Drawing.Color FillColor
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return FillColorPropertyHandler.Instance.GetValue(this);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				FillColorPropertyHandler.Instance.SetValue(this, value);
			}
		}
		/// <summary>
		/// Value handler for the EntityTypeShape.FillColor domain property.
		/// </summary>
		internal sealed partial class FillColorPropertyHandler : DslModeling::DomainPropertyValueHandler<EntityTypeShapeBase, global::System.Drawing.Color>
		{
			private FillColorPropertyHandler() { }
		
			/// <summary>
			/// Gets the singleton instance of the EntityTypeShape.FillColor domain property value handler.
			/// </summary>
			public static readonly FillColorPropertyHandler Instance = new FillColorPropertyHandler();
		
			/// <summary>
			/// Gets the Id of the EntityTypeShape.FillColor domain property.
			/// </summary>
			public sealed override global::System.Guid DomainPropertyId
			{
				[global::System.Diagnostics.DebuggerStepThrough]
				get
				{
					return FillColorDomainPropertyId;
				}
			}
			
			/// <summary>
			/// Gets a strongly-typed value of the property on specified element.
			/// </summary>
			/// <param name="element">Element which owns the property.</param>
			/// <returns>Property value.</returns>
			public override sealed global::System.Drawing.Color GetValue(EntityTypeShapeBase element)
			{
				if (element == null) throw new global::System.ArgumentNullException("element");
				// There is no storage for FillColor because its Kind is
				// set to CustomStorage. Please provide the GetFillColorValue()
				// method on the domain class.
				return element.GetFillColorValue();
			}
		
			/// <summary>
			/// Sets property value on an element.
			/// </summary>
			/// <param name="element">Element which owns the property.</param>
			/// <param name="newValue">New property value.</param>
			public override sealed void SetValue(EntityTypeShapeBase element, global::System.Drawing.Color newValue)
			{
				if (element == null) throw new global::System.ArgumentNullException("element");
		
				global::System.Drawing.Color oldValue = GetValue(element);
				if (newValue != oldValue)
				{
					ValueChanging(element, oldValue, newValue);
					// There is no storage for FillColor because its Kind is
					// set to CustomStorage. Please provide the SetFillColorValue()
					// method on the domain class.
					element.SetFillColorValue(newValue);
					ValueChanged(element, oldValue, GetValue(element));
				}
			}
		}
		
		#endregion
	}
	/// <summary>
	/// DomainClass EntityTypeShape
	/// </summary>
			
	internal partial class EntityTypeShape : EntityTypeShapeBase
	{
		#region Constructors
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		public EntityTypeShape(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
			: this(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		public EntityTypeShape(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, propertyAssignments)
		{
		}
		#endregion
	}
}

