public override IDisposable WriteClass(SpecificationDefinition specificationDefinition, string name, string baseClass, params string[] interfaces)
        {
            var classLineBuilder = new StringBuilder(1024);

            classLineBuilder.Append(GetProtectionSpecifications(specificationDefinition));
            classLineBuilder.Append(GetDomainSpecifications(specificationDefinition));
            classLineBuilder.Append(GetInheritanceSpecifications(specificationDefinition));

            var bases = new List <string>();

            if (!string.IsNullOrEmpty(baseClass))
            {
                bases.Add(baseClass);
            }
            bases.AddRange(interfaces);

            classLineBuilder.AppendFormat("class {0}", name);
            if (bases.Count > 0)
            {
                classLineBuilder.Append(" : ");
                classLineBuilder.Append(string.Join(", ", bases.ToArray()));
            }
            WriteLine(classLineBuilder.ToString());

            return(WriteBrackets());
        }
        protected virtual string GetProtectionSpecifications(SpecificationDefinition specificationDefinition)
        {
            string literalSpecifications = GetSpecifications(specificationDefinition & SpecificationDefinition.ProtectionClass);

            if (string.IsNullOrEmpty(literalSpecifications))
            {
                literalSpecifications = "public ";
            }
            return(literalSpecifications);
        }
        protected void WriteFieldOrProperty(SpecificationDefinition specificationDefinition, string name, string memberType)
        {
            var methodLineBuilder = new StringBuilder(1024);

            methodLineBuilder.Append(GetProtectionSpecifications(specificationDefinition));
            methodLineBuilder.Append(GetDomainSpecifications(specificationDefinition));
            methodLineBuilder.Append(GetInheritanceSpecifications(specificationDefinition));
            methodLineBuilder.Append(GetSpecifications(specificationDefinition & SpecificationDefinition.Event));

            methodLineBuilder.AppendFormat("{0} {1}", memberType, GetVariableExpression(name));

            Write(methodLineBuilder.ToString());
        }
Beispiel #4
0
 public virtual void WriteEnum(SpecificationDefinition specificationDefinition, string name, IDictionary <string, int> values)
 {
     using (WriteEnum(specificationDefinition, name))
     {
         var orderedValues = from nv in values orderby nv.Value select nv;
         int currentValue  = 1;
         foreach (var nameValue in orderedValues)
         {
             if (nameValue.Value == currentValue)
             {
                 WriteLine(string.Format("{0},", nameValue.Key));
             }
             else
             {
                 currentValue = nameValue.Value;
                 WriteLine(string.Format("{0} = {1},", nameValue.Key, nameValue.Value));
             }
             currentValue++;
         }
     }
 }
        public virtual void WriteEnum(SpecificationDefinition specificationDefinition, string name, IDictionary <string, int> values)
        {
            using (WriteEnum(specificationDefinition, name))
            {
                var orderedValues = from nv in values orderby nv.Value select nv;
                int currentValue = 1, counter = 0;
                foreach (var nameValue in orderedValues)
                {
                    var suffix = ++counter < orderedValues.Count() ? "," : "";

                    if (nameValue.Value == currentValue)
                    {
                        WriteLine(string.Format("{0}{1}", nameValue.Key, suffix));
                    }
                    else
                    {
                        currentValue = nameValue.Value;
                        WriteLine(string.Format("{0} = {1}{2}", nameValue.Key, nameValue.Value, suffix));
                    }
                    currentValue++;
                }
            }
        }
Beispiel #6
0
 public override void WritePropertyWithBackingField(SpecificationDefinition specificationDefinition, string name, string propertyType, bool privateSetter)
 {
     WriteFieldOrProperty(specificationDefinition, name, propertyType);
     WriteLine("{{ get; {0}set; }}", privateSetter ? "private " : string.Empty);
 }
Beispiel #7
0
 public override IDisposable WriteMethod(SpecificationDefinition specificationDefinition, string name, Type returnType,
                                         params ParameterDefinition[] parameters)
 {
     return WriteGeneralMethod(specificationDefinition, name, true, returnType, parameters, null);
 }
Beispiel #8
0
 public override IDisposable WriteProperty(SpecificationDefinition specificationDefinition, string name, string propertyType)
 {
     WriteFieldOrProperty(specificationDefinition, name, propertyType);
     WriteLine();
     return WriteBrackets();
 }
 protected virtual string GetDirectionSpecifications(SpecificationDefinition specificationDefinition)
 {
     return(GetSpecifications(specificationDefinition & SpecificationDefinition.DirectionClass));
 }
Beispiel #10
0
        protected virtual IDisposable WriteGeneralMethod(SpecificationDefinition specificationDefinition, string name,
                                                bool hasReturnType, Type returnType,
                                                IList<ParameterDefinition> parameters, IList<string> baseCallParameters)
        {
            bool monoStrict = baseCallParameters != null && baseCallParameters.Count > 0 &&
                parameters.Any(p => p.Type == typeof(DbLinq.Vendor.IVendor));

            var methodLineBuilder = new StringBuilder(1024);

            if (monoStrict)
                methodLineBuilder.Append("#if !MONO_STRICT")
                    .AppendLine();
            methodLineBuilder.Append(GetProtectionSpecifications(specificationDefinition));
            methodLineBuilder.Append(GetDomainSpecifications(specificationDefinition));
            methodLineBuilder.Append(GetInheritanceSpecifications(specificationDefinition));

            if (hasReturnType)
                methodLineBuilder.AppendFormat("{0} {1}(", GetLiteralType(returnType) ?? "void", name);
            else
                methodLineBuilder.AppendFormat("{0}(", name);
            var literalParameters = new List<string>();
            foreach (var parameter in parameters)
            {
                string literalParameter = string.Format("{0}{3}{1} {2}",
                                                        parameter.Attribute != null ? GetAttribute(parameter.Attribute) + " " : string.Empty,
                                                        parameter.LiteralType ?? GetLiteralType(parameter.Type),
                                                        parameter.Name,
                                                        GetDirectionSpecifications(parameter.SpecificationDefinition));
                literalParameters.Add(literalParameter);
            }
            methodLineBuilder.AppendFormat("{0})", string.Join(", ", literalParameters.ToArray()));
            if (baseCallParameters != null && baseCallParameters.Count > 0)
            {
                methodLineBuilder.AppendLine();
                bool strictArgs = parameters.Count != baseCallParameters.Count;
                if (strictArgs)
                    methodLineBuilder.Append("#if MONO_STRICT")
                        .AppendLine()
                        .AppendFormat("\t: base({0})", string.Join(", ", baseCallParameters.Take(parameters.Count).ToArray()))
                        .AppendLine()
                        .Append("#else   // MONO_STRICT")
                        .AppendLine();
                methodLineBuilder.AppendFormat("\t: base({0})", string.Join(", ", baseCallParameters.ToArray()));
                if (strictArgs)
                    methodLineBuilder.AppendLine()
                        .Append("#endif  // MONO_STRICT");
            }
            WriteLine(methodLineBuilder.ToString());
            return monoStrict ? WriteBrackets("#endif  // !MONO_STRICT") : WriteBrackets();
        }
Beispiel #11
0
 protected virtual string GetInheritanceSpecifications(SpecificationDefinition specificationDefinition)
 {
     return GetSpecifications(specificationDefinition & SpecificationDefinition.InheritanceClass);
 }
Beispiel #12
0
 public abstract IDisposable WriteCtor(SpecificationDefinition specificationDefinition, string name,
                                       ParameterDefinition[] parameters, IList<string> baseCallParameters);
Beispiel #13
0
 public abstract void WriteEvent(SpecificationDefinition specificationDefinition, string name, string eventDelegate);
Beispiel #14
0
        public virtual void WriteEnum(SpecificationDefinition specificationDefinition, string name, IDictionary<string, int> values)
        {
            using (WriteEnum(specificationDefinition, name))
            {
                var orderedValues = from nv in values orderby nv.Value select nv;
                int currentValue = 1, counter = 0;
                foreach (var nameValue in orderedValues)
                {

                    var suffix = ++counter < orderedValues.Count() ? "," : "";

                    if (nameValue.Value == currentValue)
                        WriteLine(string.Format("{0}{1}", nameValue.Key, suffix));
                    else
                    {
                        currentValue = nameValue.Value;
                        WriteLine(string.Format("{0} = {1}{2}", nameValue.Key, nameValue.Value, suffix));
                    }
                    currentValue++;
                }
            }
        }
Beispiel #15
0
 public virtual void WritePropertyWithBackingField(SpecificationDefinition specificationDefinition, string name, string propertyType)
 {
     WritePropertyWithBackingField(specificationDefinition, name, propertyType, false);
 }
Beispiel #16
0
 public abstract void WriteField(SpecificationDefinition specificationDefinition, string name, string fieldType);
Beispiel #17
0
 public abstract void WritePropertyWithBackingField(SpecificationDefinition specificationDefinition, string name, string propertyType, bool privateSetter);
Beispiel #18
0
 public abstract IDisposable WriteProperty(SpecificationDefinition specificationDefinition, string name, string propertyType);
Beispiel #19
0
 public abstract IDisposable WriteMethod(SpecificationDefinition specificationDefinition, string name, Type returnType,
                                         params ParameterDefinition[] parameters);
Beispiel #20
0
 /// <summary>
 /// Writes the enum.
 /// </summary>
 /// <param name="specificationDefinition">The specification definition.</param>
 /// <param name="name">The name.</param>
 /// <returns></returns>
 public override IDisposable WriteEnum(SpecificationDefinition specificationDefinition, string name)
 {
     WriteLine("{0}enum {1}", GetProtectionSpecifications(specificationDefinition), name);
     return WriteBrackets();
 }
        protected virtual IDisposable WriteGeneralMethod(SpecificationDefinition specificationDefinition, string name,
                                                         bool hasReturnType, Type returnType,
                                                         IList <ParameterDefinition> parameters, IList <string> baseCallParameters)
        {
            bool monoStrict = baseCallParameters != null && baseCallParameters.Count > 0 &&
                              parameters.Any(p => p.Type == typeof(DbLinq.Vendor.IVendor));

            var methodLineBuilder = new StringBuilder(1024);

            if (monoStrict)
            {
                methodLineBuilder.Append("#if !MONO_STRICT")
                .AppendLine();
            }
            methodLineBuilder.Append(GetProtectionSpecifications(specificationDefinition));
            methodLineBuilder.Append(GetDomainSpecifications(specificationDefinition));
            methodLineBuilder.Append(GetInheritanceSpecifications(specificationDefinition));

            if (hasReturnType)
            {
                methodLineBuilder.AppendFormat("{0} {1}(", GetLiteralType(returnType) ?? "void", name);
            }
            else
            {
                methodLineBuilder.AppendFormat("{0}(", name);
            }
            var literalParameters = new List <string>();

            foreach (var parameter in parameters)
            {
                string literalParameter = string.Format("{0}{3}{1} {2}",
                                                        parameter.Attribute != null ? GetAttribute(parameter.Attribute) + " " : string.Empty,
                                                        parameter.LiteralType ?? GetLiteralType(parameter.Type),
                                                        parameter.Name,
                                                        GetDirectionSpecifications(parameter.SpecificationDefinition));
                literalParameters.Add(literalParameter);
            }
            methodLineBuilder.AppendFormat("{0})", string.Join(", ", literalParameters.ToArray()));
            if (baseCallParameters != null && baseCallParameters.Count > 0)
            {
                methodLineBuilder.AppendLine();
                bool strictArgs = parameters.Count != baseCallParameters.Count;
                if (strictArgs)
                {
                    methodLineBuilder.Append("#if MONO_STRICT")
                    .AppendLine()
                    .AppendFormat("\t: base({0})", string.Join(", ", baseCallParameters.Take(parameters.Count).ToArray()))
                    .AppendLine()
                    .Append("#else   // MONO_STRICT")
                    .AppendLine();
                }
                methodLineBuilder.AppendFormat("\t: base({0})", string.Join(", ", baseCallParameters.ToArray()));
                if (strictArgs)
                {
                    methodLineBuilder.AppendLine()
                    .Append("#endif  // MONO_STRICT");
                }
            }
            WriteLine(methodLineBuilder.ToString());
            return(monoStrict ? WriteBrackets("#endif  // !MONO_STRICT") : WriteBrackets());
        }
Beispiel #22
0
        protected virtual string GetSpecifications(SpecificationDefinition specificationDefinition)
        {
            var literalSpecifications = new List<string>();
            if (HasSpecification(specificationDefinition, SpecificationDefinition.Internal))
                literalSpecifications.Add("internal");
            if (HasSpecification(specificationDefinition, SpecificationDefinition.Private))
                literalSpecifications.Add("private");
            if (HasSpecification(specificationDefinition, SpecificationDefinition.Protected))
                literalSpecifications.Add("protected");

            if (HasSpecification(specificationDefinition, SpecificationDefinition.Abstract))
                literalSpecifications.Add("abstract");
            if (HasSpecification(specificationDefinition, SpecificationDefinition.Virtual))
                literalSpecifications.Add("virtual");
            if (HasSpecification(specificationDefinition, SpecificationDefinition.Override))
                literalSpecifications.Add("override");
            if (HasSpecification(specificationDefinition, SpecificationDefinition.New))
                literalSpecifications.Add("new");
            if (HasSpecification(specificationDefinition, SpecificationDefinition.Static))
                literalSpecifications.Add("static");

            if (HasSpecification(specificationDefinition, SpecificationDefinition.Partial))
                literalSpecifications.Add("partial");

            if (HasSpecification(specificationDefinition, SpecificationDefinition.Out))
            {
                if (HasSpecification(specificationDefinition, SpecificationDefinition.In))
                    literalSpecifications.Add("ref");
                else
                    literalSpecifications.Add("out");
            }

            if (HasSpecification(specificationDefinition, SpecificationDefinition.Event))
                literalSpecifications.Add("event");

            string result = string.Join(" ", literalSpecifications.ToArray());
            if (!string.IsNullOrEmpty(result))
                result += " ";
            return result;
        }
 public override IDisposable WriteCtor(SpecificationDefinition specificationDefinition, string name,
                                       ParameterDefinition[] parameters, IList <string> baseCallParameters)
 {
     return(WriteGeneralMethod(specificationDefinition, name, false, null, parameters, baseCallParameters));
 }
 public abstract IDisposable WriteEnum(SpecificationDefinition specificationDefinition, string name);
 public override IDisposable WriteMethod(SpecificationDefinition specificationDefinition, string name, Type returnType,
                                         params ParameterDefinition[] parameters)
 {
     return(WriteGeneralMethod(specificationDefinition, name, true, returnType, parameters, null));
 }
 public virtual void WriteEnum(SpecificationDefinition specificationDefinition, string name, IDictionary<string, int> values)
 {
     using (WriteEnum(specificationDefinition, name))
     {
         var orderedValues = from nv in values orderby nv.Value select nv;
         int currentValue = 1;
         foreach (var nameValue in orderedValues)
         {
             if (nameValue.Value == currentValue)
                 WriteLine(string.Format("{0},", nameValue.Key));
             else
             {
                 currentValue = nameValue.Value;
                 WriteLine(string.Format("{0} = {1},", nameValue.Key, nameValue.Value));
             }
             currentValue++;
         }
     }
 }
Beispiel #27
0
 public abstract IDisposable WriteEnum(SpecificationDefinition specificationDefinition, string name);
Beispiel #28
0
        public override IDisposable WriteClass(SpecificationDefinition specificationDefinition, string name, string baseClass, params string[] interfaces)
        {
            var classLineBuilder = new StringBuilder(1024);

            classLineBuilder.Append(GetProtectionSpecifications(specificationDefinition));
            classLineBuilder.Append(GetDomainSpecifications(specificationDefinition));
            classLineBuilder.Append(GetInheritanceSpecifications(specificationDefinition));

            var bases = new List<string>();
            if (!string.IsNullOrEmpty(baseClass))
                bases.Add(baseClass);
            bases.AddRange(interfaces);

            classLineBuilder.AppendFormat("class {0}", name);
            if (bases.Count > 0)
            {
                classLineBuilder.Append(" : ");
                classLineBuilder.Append(string.Join(", ", bases.ToArray()));
            }
            WriteLine(classLineBuilder.ToString());

            return WriteBrackets();
        }
 public override IDisposable WriteProperty(SpecificationDefinition specificationDefinition, string name, string propertyType)
 {
     WriteFieldOrProperty(specificationDefinition, name, propertyType);
     WriteLine();
     return(WriteBrackets());
 }
Beispiel #30
0
 public override IDisposable WriteCtor(SpecificationDefinition specificationDefinition, string name,
                                         ParameterDefinition[] parameters, IList<string> baseCallParameters)
 {
     return WriteGeneralMethod(specificationDefinition, name, false, null, parameters, baseCallParameters);
 }
 public override void WriteField(SpecificationDefinition specificationDefinition, string name, string fieldType)
 {
     WriteFieldOrProperty(specificationDefinition, name, fieldType);
     WriteLine(";");
 }
Beispiel #32
0
        protected void WriteFieldOrProperty(SpecificationDefinition specificationDefinition, string name, string memberType)
        {
            var methodLineBuilder = new StringBuilder(1024);

            methodLineBuilder.Append(GetProtectionSpecifications(specificationDefinition));
            methodLineBuilder.Append(GetDomainSpecifications(specificationDefinition));
            methodLineBuilder.Append(GetInheritanceSpecifications(specificationDefinition));
            methodLineBuilder.Append(GetSpecifications(specificationDefinition & SpecificationDefinition.Event));

            methodLineBuilder.AppendFormat("{0} {1}", memberType, GetVariableExpression(name));

            Write(methodLineBuilder.ToString());
        }
 public override void WritePropertyWithBackingField(SpecificationDefinition specificationDefinition, string name, string propertyType, bool privateSetter)
 {
     WriteFieldOrProperty(specificationDefinition, name, propertyType);
     WriteLine("{{ get; {0}set; }}", privateSetter ? "private " : string.Empty);
 }
Beispiel #34
0
 public override void WriteField(SpecificationDefinition specificationDefinition, string name, string fieldType)
 {
     WriteFieldOrProperty(specificationDefinition, name, fieldType);
     WriteLine(";");
 }
 public override void WriteEvent(SpecificationDefinition specificationDefinition, string name, string eventDelegate)
 {
     WriteFieldOrProperty(specificationDefinition | SpecificationDefinition.Event, name, eventDelegate);
     WriteLine(";");
 }
Beispiel #36
0
 public override void WriteEvent(SpecificationDefinition specificationDefinition, string name, string eventDelegate)
 {
     WriteFieldOrProperty(specificationDefinition | SpecificationDefinition.Event, name, eventDelegate);
     WriteLine(";");
 }
 public abstract IDisposable WriteClass(SpecificationDefinition specificationDefinition, string name,
                                        string baseClass, params string[] interfaces);
Beispiel #38
0
 protected bool HasSpecification(SpecificationDefinition specificationDefinition, SpecificationDefinition test)
 {
     return (specificationDefinition & test) != 0;
 }
 public abstract IDisposable WriteMethod(SpecificationDefinition specificationDefinition, string name, Type returnType,
                                         params ParameterDefinition[] parameters);
Beispiel #40
0
 protected virtual string GetProtectionSpecifications(SpecificationDefinition specificationDefinition)
 {
     string literalSpecifications = GetSpecifications(specificationDefinition & SpecificationDefinition.ProtectionClass);
     if (string.IsNullOrEmpty(literalSpecifications))
         literalSpecifications = "public ";
     return literalSpecifications;
 }
 public abstract void WritePropertyWithBackingField(SpecificationDefinition specificationDefinition, string name, string propertyType, bool privateSetter);
Beispiel #42
0
 protected virtual string GetDirectionSpecifications(SpecificationDefinition specificationDefinition)
 {
     return GetSpecifications(specificationDefinition & SpecificationDefinition.DirectionClass);
 }
 public abstract void WriteField(SpecificationDefinition specificationDefinition, string name, string fieldType);
 /// <summary>
 /// Writes the enum.
 /// </summary>
 /// <param name="specificationDefinition">The specification definition.</param>
 /// <param name="name">The name.</param>
 /// <returns></returns>
 public override IDisposable WriteEnum(SpecificationDefinition specificationDefinition, string name)
 {
     WriteLine("{0}enum {1}", GetProtectionSpecifications(specificationDefinition), name);
     return(WriteBrackets());
 }
Beispiel #45
0
 public abstract IDisposable WriteClass(SpecificationDefinition specificationDefinition, string name,
                                        string baseClass, params string[] interfaces);
 public abstract IDisposable WriteCtor(SpecificationDefinition specificationDefinition, string name,
                                       ParameterDefinition[] parameters, IList <string> baseCallParameters);
 protected bool HasSpecification(SpecificationDefinition specificationDefinition, SpecificationDefinition test)
 {
     return((specificationDefinition & test) != 0);
 }
 public abstract IDisposable WriteProperty(SpecificationDefinition specificationDefinition, string name, string propertyType);
        protected virtual string GetSpecifications(SpecificationDefinition specificationDefinition)
        {
            var literalSpecifications = new List <string>();

            if (HasSpecification(specificationDefinition, SpecificationDefinition.Internal))
            {
                literalSpecifications.Add("internal");
            }
            if (HasSpecification(specificationDefinition, SpecificationDefinition.Private))
            {
                literalSpecifications.Add("private");
            }
            if (HasSpecification(specificationDefinition, SpecificationDefinition.Protected))
            {
                literalSpecifications.Add("protected");
            }

            if (HasSpecification(specificationDefinition, SpecificationDefinition.Abstract))
            {
                literalSpecifications.Add("abstract");
            }
            if (HasSpecification(specificationDefinition, SpecificationDefinition.Virtual))
            {
                literalSpecifications.Add("virtual");
            }
            if (HasSpecification(specificationDefinition, SpecificationDefinition.Override))
            {
                literalSpecifications.Add("override");
            }
            if (HasSpecification(specificationDefinition, SpecificationDefinition.New))
            {
                literalSpecifications.Add("new");
            }
            if (HasSpecification(specificationDefinition, SpecificationDefinition.Static))
            {
                literalSpecifications.Add("static");
            }

            if (HasSpecification(specificationDefinition, SpecificationDefinition.Partial))
            {
                literalSpecifications.Add("partial");
            }

            if (HasSpecification(specificationDefinition, SpecificationDefinition.Out))
            {
                if (HasSpecification(specificationDefinition, SpecificationDefinition.In))
                {
                    literalSpecifications.Add("ref");
                }
                else
                {
                    literalSpecifications.Add("out");
                }
            }

            if (HasSpecification(specificationDefinition, SpecificationDefinition.Event))
            {
                literalSpecifications.Add("event");
            }

            string result = string.Join(" ", literalSpecifications.ToArray());

            if (!string.IsNullOrEmpty(result))
            {
                result += " ";
            }
            return(result);
        }
 public virtual void WritePropertyWithBackingField(SpecificationDefinition specificationDefinition, string name, string propertyType)
 {
     WritePropertyWithBackingField(specificationDefinition, name, propertyType, false);
 }
 protected virtual string GetInheritanceSpecifications(SpecificationDefinition specificationDefinition)
 {
     return(GetSpecifications(specificationDefinition & SpecificationDefinition.InheritanceClass));
 }
 public abstract void WriteEvent(SpecificationDefinition specificationDefinition, string name, string eventDelegate);
Beispiel #53
0
        private void DataToControls()
        {
            if (_specification != null)
            {
                edtSpecDescription.Value = _specification.Description;
                edtSpecName.Value        = _specification.name;

                SpecificationDefinition definition = _specification.Definition;
                if (definition != null)
                {
                    rbText.Checked     = (definition.Item is String);
                    rbDocument.Checked = (definition.Item is Document);
                    if (rbText.Checked)
                    {
                        edtDefinitionText.Value = definition.Item as String;
                    }
                    else if (rbDocument.Checked)
                    {
                        documentControl.Document = definition.Item as Document;
                    }
                }


                //-----------------------------------//
                //--- Load the Limit List Control ---//
                //-----------------------------------//
                if (_specification.Limits != null)
                {
                    limitListControl.Items.Clear();
                    foreach (Limit limit in _specification.Limits)
                    {
                        AddLimitToListView(limit);
                    }
                }

                //---------------------------------------//
                //--- Load the Condition List Control ---//
                //---------------------------------------//
                if (_specification.Conditions != null)
                {
                    dgConditions.Rows.Clear();
                    foreach (String condition in _specification.Conditions)
                    {
                        int             idx = dgConditions.Rows.Add();
                        DataGridViewRow row = dgConditions.Rows[idx];
                        row.Cells["condition"].Value = condition;
                    }
                }

                //-----------------------------------------//
                //--- Load the Required Options Control ---//
                //-----------------------------------------//
                if (_specification.RequiredOptions != null)
                {
                    dgRequiredOptions.Rows.Clear();
                    foreach (String option in _specification.RequiredOptions)
                    {
                        int             idx = dgRequiredOptions.Rows.Add();
                        DataGridViewRow row = dgRequiredOptions.Rows[idx];
                        row.Cells["requiredOption"].Value = option;
                    }
                }

                //------------------------------------------//
                //--- Load the Exclusive Options Control ---//
                //------------------------------------------//
                if (_specification.ExclusiveOptions != null)
                {
                    dgExclusiveOptions.Rows.Clear();
                    foreach (String option in _specification.ExclusiveOptions)
                    {
                        int             idx = dgExclusiveOptions.Rows.Add();
                        DataGridViewRow row = dgExclusiveOptions.Rows[idx];
                        row.Cells["exclusiveOption"].Value = option;
                    }
                }

                //-------------------------------------------------//
                //--- Load the Supplimental Information Control ---//
                //-------------------------------------------------//
                if (_specification.SupplementalInformation != null)
                {
                    dgSupplimentalInfo.Rows.Clear();
                    foreach (String information in _specification.SupplementalInformation)
                    {
                        int             idx = dgSupplimentalInfo.Rows.Add();
                        DataGridViewRow row = dgSupplimentalInfo.Rows[idx];
                        row.Cells["information"].Value = information;
                    }
                }
            }
        }