Ejemplo n.º 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);
        }
Ejemplo n.º 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;
		}