Example #1
0
 public GridSchemaRegistrator(FluentGridSchemaRegistrator fluentRegistrator, string modelPropertyToBind, int columnOrder)
 {
     fluentRegistrator.Guard("FluentGridSchemaRegistrator must not be null.");
     if (string.IsNullOrEmpty(modelPropertyToBind))
     {
         throw new ArgumentNullException(modelPropertyToBind);
     }
     if (columnOrder == 0)
     {
         throw new Exception("columnOrder should be more than 0");
     }
     _fluentRegistrator = fluentRegistrator;
     _fluentRegistrator.GridSchemaContainer.Order = columnOrder;
     _fluentRegistrator.GridSchemaContainer.ModelPropetyNameToBind = modelPropertyToBind;
 }
Example #2
0
 public GridSchemaCollectionRegistrator(IContext context, CommonGridDataSchema commonGridDataSchema)
 {
     commonGridDataSchema.Guard("CommonGridDataSchema must not be null.");
     context.Guard("IContext must not be null.");
     Context = context;
     _commonGridDataSchema        = commonGridDataSchema;
     _fluentGridSchemaRegistrator = new FluentGridSchemaRegistrator
     {
         GridSchemaContainer =
         {
             GridName       = commonGridDataSchema.GridName,
             ModelName      = commonGridDataSchema.ModelName,
             ModelNamespace = commonGridDataSchema.ModelNamespace,
             PrimaryKeyName = commonGridDataSchema.PrimaryKeyName
         }
     };
 }