Exemplo n.º 1
0
 public static void EndRange(object context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     ConfigObjectReader.RangeContext rangeContext = (ConfigObjectReader.RangeContext)context;
     if (rangeContext.Dsm == null)
     {
         throw new ArgumentNullException("rangeContext.Dsm");
     }
     rangeContext.Dsm.EndRange(rangeContext.Context);
 }
Exemplo n.º 2
0
 public static bool NextRange(object context, List <object> resultStore)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     if (resultStore == null)
     {
         throw new ArgumentNullException("resultStore");
     }
     ConfigObjectReader.RangeContext rangeContext = (ConfigObjectReader.RangeContext)context;
     if (rangeContext.Dsm == null)
     {
         throw new ArgumentNullException("rangeContext.Dsm");
     }
     return(rangeContext.Dsm.NextRange(rangeContext.Context, resultStore));
 }
Exemplo n.º 3
0
 public static object StartRange(string identity, string property, Type classType, int pageSize)
 {
     if (null == classType)
     {
         throw new ArgumentNullException("classType");
     }
     if (string.IsNullOrEmpty(identity))
     {
         throw new ArgumentException("Argument 'identity' was null or emtpy.");
     }
     if (string.IsNullOrEmpty(property))
     {
         throw new ArgumentException("Argument 'property' was null or emtpy.");
     }
     DataSourceManager[]             dataSourceManagers = DataSourceManager.GetDataSourceManagers(classType, property);
     ConfigObjectReader.RangeContext rangeContext       = new ConfigObjectReader.RangeContext();
     rangeContext.Dsm     = dataSourceManagers[0];
     rangeContext.Context = rangeContext.Dsm.StartRange(identity, property, pageSize);
     return(rangeContext);
 }