コード例 #1
0
        /// <inheritdoc/>
        public override void Parse(IEnumerable <string> args)
        {
            base.Parse(args);

            SetInterfaceUri(GetCanonicalUri(AdditionalArgs[0]));
            AdditionalArgs.RemoveAt(0);

            if (Requirements.InterfaceUri.IsFile && File.Exists(Requirements.InterfaceUri.LocalPath))
            {
                TryParseSelectionsDocument();
            }
        }
コード例 #2
0
ファイル: Selection.cs プロジェクト: isabella232/0install-win
        /// <inheritdoc/>
        public override void Parse(IEnumerable <string> args)
        {
            base.Parse(args);

            Requirements.InterfaceUri = GetCanonicalUri(AdditionalArgs[0]);
            AdditionalArgs.RemoveAt(0);

            if (_version != null)
            {
                Requirements.ExtraRestrictions[Requirements.InterfaceUri] = _version;
            }
            else if (_notBefore != null || _before != null)
            {
                Requirements.ExtraRestrictions[Requirements.InterfaceUri] = new VersionRange(_notBefore, _before);
            }

            if (Requirements.InterfaceUri.IsFile && File.Exists(Requirements.InterfaceUri.LocalPath))
            {
                TryParseSelectionsDocument();
            }
        }