当前位置: 首页>>代码示例>>C#>>正文


C# MemberList类代码示例

本文整理汇总了C#中MemberList的典型用法代码示例。如果您正苦于以下问题:C# MemberList类的具体用法?C# MemberList怎么用?C# MemberList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MemberList类属于命名空间,在下文中一共展示了MemberList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateTypeMap

        public TypeMap CreateTypeMap(Type sourceType, Type destinationType, ProfileMap options, MemberList memberList)
        {
            var sourceTypeInfo = options.CreateTypeDetails(sourceType);
            var destTypeInfo = options.CreateTypeDetails(destinationType);

            var typeMap = new TypeMap(sourceTypeInfo, destTypeInfo, memberList, options);

            foreach (var destProperty in destTypeInfo.PublicWriteAccessors)
            {
                var resolvers = new LinkedList<MemberInfo>();

                if (MapDestinationPropertyToSource(options, sourceTypeInfo, destProperty.DeclaringType, destProperty.GetMemberType(), destProperty.Name, resolvers))
                {
                    typeMap.AddPropertyMap(destProperty, resolvers);
                }
            }
            if (!destinationType.IsAbstract() && destinationType.IsClass())
            {
                foreach (var destCtor in destTypeInfo.Constructors.OrderByDescending(ci => ci.GetParameters().Length))
                {
                    if (MapDestinationCtorToSource(typeMap, destCtor, sourceTypeInfo, options))
                    {
                        break;
                    }
                }
            }
            return typeMap;
        }
开发者ID:GeertVL,项目名称:AutoMapper,代码行数:28,代码来源:TypeMapFactory.cs

示例2: SymbolTableUpdateEventHandler

 void SymbolTableUpdateEventHandler(Compilation updatedSymbolTable, UpdateSpecification updateSpecification, MemberList changedMembers){
   lock(this){
     Thread savedCurrentThread = this.currentThread;
     if (Thread.CurrentThread == this.currentThread) Console.WriteLine("Update event called on same thread as the one causing the update");
     if (!Thread.CurrentThread.IsThreadPoolThread) Console.WriteLine("Updated event called from a non thread pool thread");
     if (!Thread.CurrentThread.IsBackground) Console.WriteLine("Updated event called from a non background thread");
     this.currentThread = Thread.CurrentThread;
     if (updatedSymbolTable == null){Console.WriteLine("SymbolTable update with null value for updatedSymbolTable"); return;}
     if (updatedSymbolTable.TargetModule == null){Console.WriteLine("SymbolTable update with null value for updatedSymbolTable.TargetModule"); return;}
     Console.WriteLine("Received update event on symbol table: {0}", ((Compilation)updateSpecification.Original).TargetModule.Name);
     for (int i = 0, n = changedMembers == null ? 0 : changedMembers.Count; i < n; i++){
       Member mem = changedMembers[i];
       if (mem == null)
         Console.WriteLine("changedMembers[{0}] == null", i);
       else
         Console.WriteLine("changedMembers[{0}].FullName == {1}", i, mem.FullName);
     }
     for (int i = 0, n = this.compilations.Count; i < n; i++){
       Compilation compilation = this.compilations[i];
       if (compilation == null || compilation == updateSpecification.Original) continue;
       for (int j = 0, m = compilation.ReferencedCompilations == null ? 0 : compilation.ReferencedCompilations.Count; j < m; j++){
         Compilation rComp = compilation.ReferencedCompilations[j];
         if (rComp != updateSpecification.Original) continue;
         Compilation upd = this.compiler.UpdateSymbolTable(compilation, (Compilation)updateSpecification.Original, updatedSymbolTable, changedMembers, this.errors);
         if (upd == null){
           Console.WriteLine("Referenced compilation {0} was not updated", j);
         }else
           this.CheckUpdatedCompilation(compilation, upd);
       }
     }
     this.currentThread = savedCurrentThread;
   }
 }
开发者ID:hesam,项目名称:SketchSharp,代码行数:33,代码来源:main.cs

示例3: TypeMap

 public TypeMap(TypeInfo sourceType, TypeInfo destinationType, MemberList memberList)
 {
     _sourceType = sourceType;
     _destinationType = destinationType;
     Profile = ConfigurationStore.DefaultProfileName;
     ConfiguredMemberList = memberList;
 }
开发者ID:yaroslavya,项目名称:AutoMapper,代码行数:7,代码来源:TypeMap.cs

示例4: CreateTypeMap

        public TypeMap CreateTypeMap(Type sourceType, Type destinationType, IProfileConfiguration options, MemberList memberList)
        {
            var sourceTypeInfo = GetTypeInfo(sourceType, options);
            var destTypeInfo = GetTypeInfo(destinationType, options);

            var typeMap = new TypeMap(sourceTypeInfo, destTypeInfo, memberList, options.ProfileName);

            foreach (var destProperty in destTypeInfo.PublicWriteAccessors)
            {
                var resolvers = new LinkedList<IValueResolver>();

                if (MapDestinationPropertyToSource(options, sourceTypeInfo, destProperty.GetMemberType(), destProperty.Name, resolvers))
                {
                    var destPropertyAccessor = destProperty.ToMemberAccessor();

                    typeMap.AddPropertyMap(destPropertyAccessor, resolvers);
                }
            }
            if (!destinationType.IsAbstract() && destinationType.IsClass())
            {
                foreach (var destCtor in destTypeInfo.Constructors.OrderByDescending(ci => ci.GetParameters().Length))
                {
                    if (MapDestinationCtorToSource(typeMap, destCtor, sourceTypeInfo, options))
                    {
                        break;
                    }
                }
            }
            return typeMap;
        }
开发者ID:garora,项目名称:AutoMapper,代码行数:30,代码来源:TypeMapFactory.cs

示例5: CreateTypeMap

        //internal static ICollection<IChildMemberConfiguration> sourceToDestinationMemberMappers = new Collection<IChildMemberConfiguration>
        //{
        //    // Need to do it fixie way for prefix and postfix to work together + not specify match explicitly
        //    // Have 3 properties for Members, Methods, And External Methods
        //    // Parent goes to all
        //    new MemberConfiguration().AddMember<NameSplitMember>().AddName<PrePostfixName>(_ => _.AddStrings(p => p.Prefixes, "Get")).SetMemberInfo<AllMemberInfo>(),
        //    //new CustomizedSourceToDestinationMemberMapper().MemberNameMatch().ExtensionNameMatch().ExtensionPrefix("Get").MethodPrefix("Get").MethodNameMatch(),
        //};
        //internal static readonly ICollection<IChildMemberConfiguration> def = sourceToDestinationMemberMappers.ToList();
        public TypeMap CreateTypeMap(Type sourceType, Type destinationType, IProfileConfiguration options,
            MemberList memberList)
        {
            var sourceTypeInfo = GetTypeInfo(sourceType, options);
            var destTypeInfo = GetTypeInfo(destinationType, options);

            var typeMap = new TypeMap(sourceTypeInfo, destTypeInfo, memberList);

            foreach (var destProperty in destTypeInfo.PublicWriteAccessors)
            {
                var members = new LinkedList<MemberInfo>();

                if (MapDestinationPropertyToSource(options, sourceTypeInfo, destProperty.GetType(), destProperty.Name,
                    members))
                {
                    var resolvers = members.Select(mi => ReflectionHelper.ToMemberGetter(mi));
                    var destPropertyAccessor = ReflectionHelper.ToMemberAccessor(destProperty);

                    typeMap.AddPropertyMap(destPropertyAccessor, resolvers.Cast<IValueResolver>());
                }
            }
            if (!TypeExtensions.IsAbstract(destinationType) && TypeExtensions.IsClass(destinationType))
            {
                foreach (var destCtor in destTypeInfo.Constructors.OrderByDescending(ci => ci.GetParameters().Length))
                {
                    if (MapDestinationCtorToSource(typeMap, destCtor, sourceTypeInfo, options))
                    {
                        break;
                    }
                }
            }
            return typeMap;
        }
开发者ID:CyranoChen,项目名称:Arsenalcn,代码行数:42,代码来源:TypeMapFactory.cs

示例6: CreateTypeMap

        public TypeMap CreateTypeMap(Type sourceType, Type destinationType, IMappingOptions options,
            MemberList memberList)
        {
            var sourceTypeInfo = GetTypeInfo(sourceType, options);
            var destTypeInfo = GetTypeInfo(destinationType, options.ShouldMapProperty, options.ShouldMapField, new MethodInfo[0]);

            var typeMap = new TypeMap(sourceTypeInfo, destTypeInfo, memberList);

            foreach (var destProperty in destTypeInfo.PublicWriteAccessors)
            {
                var members = new LinkedList<MemberInfo>();

                if (MapDestinationPropertyToSource(members, sourceTypeInfo, destProperty.Name, options))
                {
                    var resolvers = members.Select(mi => mi.ToMemberGetter());
                    var destPropertyAccessor = destProperty.ToMemberAccessor();

                    typeMap.AddPropertyMap(destPropertyAccessor, resolvers.Cast<IValueResolver>());
                }
            }
            if (!destinationType.IsAbstract() && destinationType.IsClass())
            {
                foreach (var destCtor in destTypeInfo.Constructors.OrderByDescending(ci => ci.GetParameters().Length))
                {
                    if (MapDestinationCtorToSource(typeMap, destCtor, sourceTypeInfo, options))
                    {
                        break;
                    }
                }
            }
            return typeMap;
        }
开发者ID:redwyre,项目名称:AutoMapper,代码行数:32,代码来源:TypeMapFactory.cs

示例7: Process

        public override MemberList Process(WebClient client)
        {
            MemberList ml = new MemberList();

            String content = client.DownloadString(GetUrl());

            MatchCollection mc = Regex.Matches(content, "<option value=\"(\\d+)\">(.+?)</option>");
            foreach (Match m in mc)
            {
                String id = m.Groups[1].Value;
                String name = m.Groups[2].Value;

                if (id != "0")
                {
                    CategoryTop c = new CategoryTop();
                    c.Name = name;
                    c.Id = id;

                    Children.Add(c);
                    ml.Add(c);
                }
            }

            Unprocessed = false;
            return ml;
        }
开发者ID:Infarch,项目名称:MyPerlModules,代码行数:26,代码来源:CategoryRoot.cs

示例8: showChildWindow

 public void showChildWindow(AdminService.MemberList info)
 {
     UserID = info.UserID;
     org = info;
     memList = ModelCopy.CopyValueForModel<MemberList>(info);
     base.Show();
 }
开发者ID:dalinhuang,项目名称:my-un-code,代码行数:7,代码来源:ChildModifyMemberInfo.xaml.cs

示例9: TypeMap

 public TypeMap(TypeDetails sourceType, TypeDetails destinationType, MemberList memberList, ProfileMap profile)
 {
     SourceTypeDetails = sourceType;
     DestinationTypeDetails = destinationType;
     Types = new TypePair(sourceType.Type, destinationType.Type);
     Profile = profile;
     ConfiguredMemberList = memberList;
 }
开发者ID:GeertVL,项目名称:AutoMapper,代码行数:8,代码来源:TypeMap.cs

示例10: TypeMap

 public TypeMap(TypeDetails sourceType, TypeDetails destinationType, MemberList memberList)
 {
     _sourceType = sourceType;
     _destinationType = destinationType;
     Types = new TypePair(sourceType.Type, destinationType.Type);
     Profile = ConfigurationStore.DefaultProfileName;
     ConfiguredMemberList = memberList;
 }
开发者ID:CyranoChen,项目名称:Arsenalcn,代码行数:8,代码来源:TypeMap.cs

示例11: Facede

 public Facede(Bll.Facede Application)
 {
     column = new Column(Application);
     corporationList = new CorporationList(Application);
     list = new List(Application);
     listColumn = new ListColumn(Application);
     listItem = new ListItem(Application);
     memberList = new MemberList(Application);
 }
开发者ID:hacikaraa,项目名称:Goldepus,代码行数:9,代码来源:_Facede.cs

示例12: GetUnprocessedChildren

 public MemberList GetUnprocessedChildren()
 {
     MemberList ml = new MemberList();
     Children.ForEach(delegate(AbstractMember m)
     {
         ml.AddRange(m.GetUnprocessedChildren());
     });
     return ml;
 }
开发者ID:Infarch,项目名称:MyPerlModules,代码行数:9,代码来源:AbstractMember.cs

示例13: TypeMap

 public TypeMap(TypeDetails sourceType, TypeDetails destinationType, MemberList memberList, IProfileConfiguration profile)
 {
     SourceTypeDetails = sourceType;
     DestinationTypeDetails = destinationType;
     Types = new TypePair(sourceType.Type, destinationType.Type);
     Profile = profile;
     ConfiguredMemberList = memberList;
     IgnorePropertiesStartingWith = profile.GlobalIgnores;
 }
开发者ID:jbogard,项目名称:AutoMapper,代码行数:9,代码来源:TypeMap.cs

示例14: Process

        public override MemberList Process(WebClient client)
        {
            MemberList ml = new MemberList();
            String content = client.DownloadString(GetUrl());

            MatchCollection mc = Regex.Matches(content,
                "<a href=\"http://baki\\.info/subcat/(\\d+)\" class=\"sc_listone\">.*?<span class=\"csc_sub_name\"><div class=\"title_inner\">(.+?)</div>", RegexOptions.Singleline);
            if (mc.Count > 0)
            {
                // process sub categories
                foreach (Match m in mc)
                {
                    CategorySub c = new CategorySub();
                    c.Id = m.Groups[1].Value;
                    c.Name = m.Groups[2].Value.Replace("&nbsp;", " ").Replace("&amp;", "&").Trim();

                    Children.Add(c);
                    ml.Add(c);
                }

                Unprocessed = false;
            }
            else
            {
                // process products
                content = client.DownloadString(ProductsUrl(page));

                MatchCollection mc1 = Regex.Matches(content, "<div class=\"cop_title\"><h3><a href=\"(.+?)\">(.+?)</a></h3></div>");

                foreach (Match m in mc1)
                {
                    Product p = new Product();
                    p.Name = m.Groups[2].Value.Replace("&nbsp;", " ").Replace("&amp;", "&").Trim();
                    p.Url = m.Groups[1].Value;

                    Children.Add(p);
                    ml.Add(p);
                }

                MatchCollection mc2 = Regex.Matches(content, "new Paginator\\('paginator1', (\\d+?), \\d+, (\\d+?), \"#\"\\);");
                String total = mc2[0].Groups[1].Value;
                String current = mc2[0].Groups[2].Value;

                if (page < Int16.Parse(total))
                {
                    Page++;
                    ml.Add(this);
                }
                else
                {
                    Unprocessed = false;
                }

            }

            return ml;
        }
开发者ID:Infarch,项目名称:MyPerlModules,代码行数:57,代码来源:CategorySub.cs

示例15: GetNestedNamespaces

 public virtual MemberList GetNestedNamespaces(Identifier name, Scope scope) {
   MemberList fullList = this.GetNestedNamespacesAndTypes(name, scope);
   MemberList result = new MemberList();
   for (int i = 0, n = fullList == null ? 0 : fullList.Count; i < n; i++){
     Namespace ns = fullList[i] as Namespace;
     if (ns == null) continue;
     result.Add(ns);
   }
   return result;
 }
开发者ID:tapicer,项目名称:resource-contracts-.net,代码行数:10,代码来源:LanguageService.cs


注:本文中的MemberList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。