Exemple #1
0
 protected virtual void OnCollectionClassChanged(string oldValue, string newValue)
 {
     TrackingHelper.UpdateTrackingCollectionProperty(Store,
                                                     Store.Get <Association>().ToList(),
                                                     Association.CollectionClassDomainPropertyId,
                                                     Association.IsCollectionClassTrackingDomainPropertyId);
 }
Exemple #2
0
            protected override void OnValueChanged(ModelRoot element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);

                if (!element.Store.InUndoRedoOrRollback)
                {
                    if (string.IsNullOrWhiteSpace(element.EntityNamespace))
                    {
                        TrackingHelper.UpdateTrackingCollectionProperty(element.Store
                                                                        , element.Classes.Where(c => !c.IsDependentType)
                                                                        , ModelClass.NamespaceDomainPropertyId
                                                                        , ModelClass.IsNamespaceTrackingDomainPropertyId);
                    }

                    if (string.IsNullOrWhiteSpace(element.StructNamespace))
                    {
                        TrackingHelper.UpdateTrackingCollectionProperty(element.Store
                                                                        , element.Classes.Where(c => c.IsDependentType)
                                                                        , ModelClass.NamespaceDomainPropertyId
                                                                        , ModelClass.IsNamespaceTrackingDomainPropertyId);
                    }

                    if (string.IsNullOrWhiteSpace(element.EnumNamespace))
                    {
                        TrackingHelper.UpdateTrackingCollectionProperty(element.Store, element.Enums, ModelEnum.NamespaceDomainPropertyId, ModelEnum.IsNamespaceTrackingDomainPropertyId);
                    }
                }
            }
Exemple #3
0
 protected virtual void OnDatabaseSchemaChanged(string oldValue, string newValue)
 {
     TrackingHelper.UpdateTrackingCollectionProperty(Store,
                                                     Classes,
                                                     ModelClass.DatabaseSchemaDomainPropertyId,
                                                     ModelClass.IsDatabaseSchemaTrackingDomainPropertyId);
 }
Exemple #4
0
 /// <summary>
 /// Updates tracking properties when the IsImplementNotify value changes
 /// </summary>
 /// <param name="oldValue">Prior value</param>
 /// <param name="newValue">Current value</param>
 protected virtual void OnAutoPropertyDefaultChanged(bool oldValue, bool newValue)
 {
     TrackingHelper.UpdateTrackingCollectionProperty(Store,
                                                     Classes,
                                                     ModelClass.AutoPropertyDefaultDomainPropertyId,
                                                     ModelClass.IsAutoPropertyDefaultTrackingDomainPropertyId);
 }
Exemple #5
0
 protected virtual void OnDatabaseCollationDefaultChanged(string oldValue, string newValue)
 {
     TrackingHelper.UpdateTrackingCollectionProperty(Store,
                                                     Classes,
                                                     ModelAttribute.DatabaseCollationDomainPropertyId,
                                                     ModelAttribute.IsDatabaseCollationTrackingDomainPropertyId);
 }
Exemple #6
0
            protected override void OnValueChanged(ModelRoot element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);

                if (!element.Store.InUndoRedoOrRollback)
                {
                    TrackingHelper.UpdateTrackingCollectionProperty(element.Store, element.Enums, ModelEnum.NamespaceDomainPropertyId, ModelEnum.IsNamespaceTrackingDomainPropertyId);
                }
            }
Exemple #7
0
 protected virtual void OnTypeChanged(string oldValue, string newValue)
 {
    if (ModelClass != null)
    {
       TrackingHelper.UpdateTrackingCollectionProperty(Store,
                                                       ModelClass.Attributes,
                                                       ModelAttribute.ColumnTypeDomainPropertyId,
                                                       ModelAttribute.IsColumnTypeTrackingDomainPropertyId);
    }
 }
Exemple #8
0
 protected virtual void OnIsImplementNotifyChanged(bool oldValue, bool newValue)
 {
     TrackingHelper.UpdateTrackingCollectionProperty(Store,
                                                     Attributes,
                                                     ModelAttribute.ImplementNotifyDomainPropertyId,
                                                     ModelAttribute.IsImplementNotifyTrackingDomainPropertyId);
     TrackingHelper.UpdateTrackingCollectionProperty(Store,
                                                     Store.ElementDirectory.AllElements.OfType <Association>().Where(a => a.Source?.FullName == FullName),
                                                     Association.TargetImplementNotifyDomainPropertyId,
                                                     Association.IsTargetImplementNotifyTrackingDomainPropertyId);
     TrackingHelper.UpdateTrackingCollectionProperty(Store,
                                                     Store.ElementDirectory.AllElements.OfType <BidirectionalAssociation>().Where(a => a.Target?.FullName == FullName),
                                                     BidirectionalAssociation.SourceImplementNotifyDomainPropertyId,
                                                     BidirectionalAssociation.IsSourceImplementNotifyTrackingDomainPropertyId);
 }
Exemple #9
0
 protected virtual void OnNamespaceChanged(string oldValue, string newValue)
 {
     TrackingHelper.UpdateTrackingCollectionProperty(Store, Types, ModelClass.NamespaceDomainPropertyId, ModelClass.IsNamespaceTrackingDomainPropertyId);
     TrackingHelper.UpdateTrackingCollectionProperty(Store, Types, ModelEnum.NamespaceDomainPropertyId, ModelEnum.IsNamespaceTrackingDomainPropertyId);
 }
Exemple #10
0
 protected virtual void OnEnumOutputDirectoryChanged(string oldValue, string newValue)
 {
     TrackingHelper.UpdateTrackingCollectionProperty(Store, Classes, ModelEnum.OutputDirectoryDomainPropertyId, ModelEnum.IsOutputDirectoryTrackingDomainPropertyId);
 }