Esempio n. 1
0
 protected virtual void OnCollectionClassChanged(string oldValue, string newValue)
 {
     TrackingHelper.UpdateTrackingCollectionProperty(Store,
                                                     Store.Get <Association>().ToList(),
                                                     Association.CollectionClassDomainPropertyId,
                                                     Association.IsCollectionClassTrackingDomainPropertyId);
 }
Esempio n. 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);
                    }
                }
            }
Esempio n. 3
0
 protected virtual void OnDatabaseSchemaChanged(string oldValue, string newValue)
 {
     TrackingHelper.UpdateTrackingCollectionProperty(Store,
                                                     Classes,
                                                     ModelClass.DatabaseSchemaDomainPropertyId,
                                                     ModelClass.IsDatabaseSchemaTrackingDomainPropertyId);
 }
Esempio n. 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);
 }
Esempio n. 5
0
 protected virtual void OnDatabaseCollationDefaultChanged(string oldValue, string newValue)
 {
     TrackingHelper.UpdateTrackingCollectionProperty(Store,
                                                     Classes,
                                                     ModelAttribute.DatabaseCollationDomainPropertyId,
                                                     ModelAttribute.IsDatabaseCollationTrackingDomainPropertyId);
 }
Esempio n. 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);
                }
            }
Esempio n. 7
0
 protected virtual void OnTypeChanged(string oldValue, string newValue)
 {
    if (ModelClass != null)
    {
       TrackingHelper.UpdateTrackingCollectionProperty(Store,
                                                       ModelClass.Attributes,
                                                       ModelAttribute.ColumnTypeDomainPropertyId,
                                                       ModelAttribute.IsColumnTypeTrackingDomainPropertyId);
    }
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 10
0
 protected virtual void OnEnumOutputDirectoryChanged(string oldValue, string newValue)
 {
     TrackingHelper.UpdateTrackingCollectionProperty(Store, Classes, ModelEnum.OutputDirectoryDomainPropertyId, ModelEnum.IsOutputDirectoryTrackingDomainPropertyId);
 }