コード例 #1
0
 public static void RegisterRestfulObjectsRoutes(RouteCollection routes)
 {
     if (NakedObjectsRunSettings.RestRoot != null)
     {
         RestfulObjectsControllerBase.AddRestRoutes(routes, NakedObjectsRunSettings.RestRoot);
     }
 }
コード例 #2
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            RestfulObjectsControllerBase.AddRestRoutes(routes);

            // to make whole application 'read only'
            //RestfulObjectsControllerBase.IsReadOnly = true;

            // to configure domain model options
            //RestfulObjectsControllerBase.DomainModel = RestControlFlags.DomainModelType.Selectable; //or Simple, Formal, None

            //to enforce concurrency checking
            //RestfulObjectsControllerBase.ConcurrencyChecking = true;

            // to change cache settings (transactional, user, non-expiring) where 0 = no-cache
            // 0, 3600, 86400 are the defaults
            //RestfulObjectsControllerBase.CacheSettings = new Tuple<int, int, int>(0, 3600, 86400);

            // to set KeySeparator (for multi-part keys) defaults to "-"
            //RestfulObjectsControllerBase.KeySeparator = "-";

            // make Accept header handling non-strict (RO spec 2.4.4)
            //RestfulObjectsControllerBase.AcceptHeaderStrict = false;

            // to change the size limit on returned collections. The default value is 20.  Specifying 0 means 'unlimited'.
            //RestfulObjectsControllerBase.DefaultPageSize = 50;
        }
コード例 #3
0
 public static void RegisterRestfulObjectsRoutes(RouteCollection routes)
 {
     if (RestRoot != null)
     {
         RestfulObjectsControllerBase.AddRestRoutes(routes, RestRoot);
     }
 }
コード例 #4
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            RestfulObjectsControllerBase.AddRestRoutes(routes);

            // to make whole application 'read only'
            //RestfulObjectsControllerBase.IsReadOnly = true;

            // to configure domain model options
            //RestfulObjectsControllerBase.DomainModel = RestControlFlags.DomainModelType.Selectable; //or Simple, Formal, None

            //to enforce concurrency checking
            //RestfulObjectsControllerBase.ConcurrencyChecking = true;

            // to change cache settings (transactional, user, non-expiring) where 0 = no-cache
            // 0, 3600, 86400 are the defaults
            //RestfulObjectsControllerBase.CacheSettings = new Tuple<int, int, int>(0, 3600, 86400);
        }