Example #1
0
        /// <summary>
        /// Instantiates <see cref="ContextOptions"/> and set defaults to global options.
        /// </summary>
        public GlobalOptions()
        {
            EntitySets = new ContextOptions();
            EntityTypes = new ContextOptions();
            NavigationProps = new ContextOptions();
            Associations = new ContextOptions();
            ScalarMembers = new ContextOptions();
            ComplexProps = new ContextOptions();
            ComplexTypes = new ContextOptions();
            Methods = new ContextOptions();

            OutputFileNamePattern = "{name}-fixed.edmx";
        }
Example #2
0
 public ContextOptions(ref ContextOptions defaults)
 {
     CopyFrom(ref defaults);
 }
Example #3
0
        /// <summary>
        /// Copies ALL the values from <paramref name="source"/> to <c>this</c> instance.
        /// </summary>
        /// <param name="source">ContextOptions instance to copy from</param>
        public void CopyFrom(ref ContextOptions source)
        {
            Flexing = source.Flexing ?? Flexing;
            CaseStyle = source.CaseStyle ?? CaseStyle;

            RemovePrefixes = source.RemovePrefixes ?? RemovePrefixes;
            RemoveSuffixes = source.RemoveSuffixes ?? RemoveSuffixes;
            AddPrefix = source.AddPrefix ?? AddPrefix;
            AddSuffix = source.AddSuffix ?? AddSuffix;

            ApplyRegex = source.ApplyRegex ?? ApplyRegex;
            RegexMatch = source.RegexMatch ?? RegexMatch;
            RegexReplace = source.RegexReplace ?? RegexReplace;
        }