Beispiel #1
0
        private int DavReportBase_ValidateDavRequest(object sender, EventArgs e)
        {
            int _returnCode = (int)ServerResponseCode.Ok;

            if (base.RequestXml == null)
            {
                _returnCode = (int)ServerResponseCode.BadRequest;
            }

            else
            {
                XPathNavigator _requestXPathNavigator = base.RequestXml;
                if (_requestXPathNavigator.MoveToFirstChild())
                {
                    switch (_requestXPathNavigator.LocalName.ToLower(CultureInfo.InvariantCulture))
                    {
                    case "version-tree":
                        this.RequestVersionReportType = VersionReportType.VersionTree;
                        break;

                    case "expand-property":
                        this.RequestVersionReportType = VersionReportType.ExpandProperty;
                        break;
                    }
                }
                else
                {
                    _returnCode = (int)ServerResponseCode.BadRequest;
                }
            }

            return(_returnCode);
        }
Beispiel #2
0
		private int DavReportBase_ValidateDavRequest(object sender, EventArgs e)
		{
			int _returnCode = (int)ServerResponseCode.Ok;

			if (base.RequestXml == null)
				_returnCode = (int)ServerResponseCode.BadRequest;

			else
			{
				XPathNavigator _requestXPathNavigator = base.RequestXml;
				if (_requestXPathNavigator.MoveToFirstChild())
				{
					switch (_requestXPathNavigator.LocalName.ToLower(CultureInfo.InvariantCulture))
					{
						case "version-tree":
							this.RequestVersionReportType = VersionReportType.VersionTree;
							break;
						case "expand-property":
							this.RequestVersionReportType = VersionReportType.ExpandProperty;
							break;
					}
				}
				else
					_returnCode = (int)ServerResponseCode.BadRequest;
			}

			return _returnCode;
		}