public void Execute(IInnerContent parameter)
                {
                    var contexts = _contexts.Get(parameter.Get());

                    contexts.Push(parameter);
                    _handler.Execute(parameter);
                    contexts.Pop();
                }
示例#2
0
                public bool IsSatisfiedBy(IInnerContent parameter)
                {
                    var contexts = _contexts.Get(parameter.Get());

                    contexts.Push(parameter);
                    var result = _handler.IsSatisfiedBy(parameter);

                    contexts.Pop();
                    return(result);
                }
示例#3
0
        public bool IsSatisfiedBy(IInnerContent parameter)
        {
            var content = parameter.Get();
            var key     = _formatter.Get(content);
            var member  = _serialization.Get(parameter.Current)
                          .Get(key);
            var result = member != null;

            if (result)
            {
                _handler.Handle(parameter, member);
            }

            return(result);
        }
 public void Handle(IInnerContent contents, IMemberSerializer member)
 {
     try
     {
         _handler.Handle(contents, member);
     }
     catch (Exception e)
     {
         var line = contents.Get()
                    .Get()
                    .To <IXmlLineInfo>();
         throw new
               InvalidOperationException($"An exception was encountered while deserializing member '{member.Profile.Metadata.ReflectedType}.{member.Profile.Name}'.",
                                         new XmlException(e.Message, e, line.LineNumber, line.LinePosition));
     }
 }
示例#5
0
        public bool IsSatisfiedBy(IInnerContent parameter)
        {
            var content       = parameter.Get();
            var key           = _formatter.Get(content);
            var serialization = _serialization.Get(parameter);

            if (serialization != null)
            {
                var member = serialization.Get(key);
                var result = member != null;
                if (result)
                {
                    _handler.Handle(parameter, member);
                    return(true);
                }
            }

            return(false);
        }
 public IFormatReader Get() => _content.Get();