src/Misc/EFTools/EntityDesignPackage/CustomCode/MicrosoftDataEntityDesignCommandSet.cs
/// <summary>
///     Checks to see whether only objects which are allowed to be deleted from the model are selected
/// </summary>
/// <returns></returns>
Checks to see whether only objects which are allowed to be deleted from the model are selected
Checks to see whether only objects which are allowed to be deleted from the model are selected
private bool OnlyDeletableObjectsSelected()
        {
            if (CurrentSelection.Count == 0)
            {
                return false;
            }
            var allowedTypes = new List<Type>
                {
                    typeof(PropertyBase),
                    typeof(InheritanceConnector),
                    typeof(AssociationConnector),
                    typeof(EntityTypeShape)
                };
            foreach (var o in CurrentSelection)
            {
                var selectedType = o.GetType();
                if (!allowedTypes.Any(type => type.IsAssignableFrom(selectedType)))
                {
                    return false;
                }
            }
            return true;
        }
private bool OnlyDeletableObjectsSelected ( ) { if ( CurrentSelection . Count == 0 ) { return false ; } var allowedTypes = new List < Type > { typeof ( PropertyBase ) , typeof ( InheritanceConnector ) , typeof ( AssociationConnector ) , typeof ( EntityTypeShape ) } ; foreach ( var o in CurrentSelection ) { var selectedType = o . GetType ( ) ; if ( ! allowedTypes . Any ( type => type . IsAssignableFrom ( selectedType ) ) ) { return false ; } } return true ; }
Checks to see whether only objects which are allowed to be deleted from the model are selected
Checks to see whether only objects which are allowed to be deleted from the model are selected
None