Example #1
0
 public static ReservedArguments CreateReservedArguments(string query) {
     NameValueCollection collection = HttpUtility.ParseQueryString(query);
     var args = new ReservedArguments();
     PopulateReservedArgs(collection, args);
     return args;
 }
Example #2
0
        private static void PopulateReservedArgs(NameValueCollection collection, ReservedArguments args) {
            try {
                string voFlag = collection[RestControlFlags.ValidateOnlyReserved];
                string domainModel = collection[RestControlFlags.DomainModelReserved];

                args.ValidateOnly = voFlag != null && bool.Parse(voFlag);
                args.DomainModel = domainModel;
            }
            catch (Exception e) {
                Logger.ErrorFormat("Malformed reserved arguments: {0}", e.Message);
                args.IsMalformed = true;
            }
        }