Exemplo n.º 1
0
        protected override void HandleTarget(ServerContext context, ParserResult result, IExperimentalFlag target)
        {
            if (target == default(IExperimentalFlag))
            {
                return;
            }

            if (result.TryFind(Enablement, out var enablement, allowImplicit: false))
            {
                if (!Experiments.Instance.TrySet(target, enablement))
                {
                    throw new Exception(@"Unknown error occurred.");
                }
            }