コード例 #1
0
        private DictionaryEntrySourceMember(
            Type type,
            Func <string> pathFactory,
            QualifiedMember matchedTargetMember,
            DictionarySourceMember parent,
            Member[] childMembers = null)
        {
            Type                 = type;
            _pathFactory         = pathFactory;
            _matchedTargetMember = matchedTargetMember;
            Parent               = parent;
            _childMembers        = childMembers ?? new[] { Member.RootSource(type) };

            if (childMembers == null)
            {
                IsEnumerable = _childMembers.First().IsEnumerable;
                IsSimple     = !IsEnumerable && _childMembers.First().IsSimple;
                return;
            }

            var leafMember = childMembers.Last();

            IsEnumerable = leafMember.IsEnumerable;
            IsSimple     = leafMember.IsSimple;
        }
コード例 #2
0
 public DictionaryEntrySourceMember(
     Type entryType,
     QualifiedMember matchedTargetMember,
     DictionarySourceMember parent)
     : this(
         entryType,
         () => parent.GetPath() + "['" + matchedTargetMember.Name + "']",
         matchedTargetMember,
         parent)
 {
 }
コード例 #3
0
 private DictionaryEntrySourceMember(
     Type type,
     Func <string> pathFactory,
     QualifiedMember matchedTargetMember,
     DictionarySourceMember parent)
 {
     Type                 = type;
     _pathFactory         = pathFactory;
     _matchedTargetMember = matchedTargetMember;
     Parent               = parent;
 }
コード例 #4
0
        private DictionaryEntrySourceMember(
            Type type,
            Func <string> pathFactory,
            QualifiedMember matchedTargetMember,
            DictionarySourceMember parent,
            Member[] childMembers)
            : this(type, pathFactory, matchedTargetMember, parent)
        {
            _childMembers = childMembers;

            var leafMember = childMembers.Last();

            IsEnumerable = leafMember.IsEnumerable;
            IsSimple     = leafMember.IsSimple;
        }
コード例 #5
0
        public DictionaryEntrySourceMember(
            Type entryType,
            QualifiedMember matchedTargetMember,
            DictionarySourceMember parent)
            : this(
                entryType,
                () => parent.GetPath() + "['" + matchedTargetMember.Name + "']",
                matchedTargetMember,
                parent)
        {
            var entryMember = Member.RootSource(entryType);

            _childMembers = new[] { entryMember };

            IsEnumerable = entryMember.IsEnumerable;
            IsSimple     = !IsEnumerable && entryMember.IsSimple;
        }