• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# MemberList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: VisitMemberList

 public override MemberList VisitMemberList(MemberList members){
   if (members == null) return null;
   for (int i = 0, n = members.Count; i < n; i++){
     Member mem = members[i]; if (mem == null) continue;
     if (this.Line != int.MinValue){
       if (!mem.SourceContext.Encloses(this.Line, this.Column)) continue;
     }else{
       if (!mem.SourceContext.Encloses(this.SourceContext)) continue;
     }
     this.Visit(mem);
     break;
   }
   return members;
 }
开发者ID:tapicer,项目名称:resource-contracts-.net,代码行数:14,代码来源:Finders.cs


示例17: GetTypesNamespacesAndPrefixes

 public override MemberList GetTypesNamespacesAndPrefixes(Scope scope, bool constructorMustBeVisible, bool listAllUnderRootNamespace) {
   MemberList result = new MemberList();
   while (scope != null && !(scope is TypeScope || scope is NamespaceScope)) scope = scope.OuterScope;
   if (scope == null) return result;
   TypeNode currentType = scope is TypeScope ? ((TypeScope)scope).Type : null;
   if (!(scope is NamespaceScope) && (currentType == null || currentType.DeclaringModule == null)) return result;
   ErrorHandler errorHandler = new ErrorHandler(new ErrorNodeList(0));
   TrivialHashtable ambiguousTypes = new TrivialHashtable();
   TrivialHashtable referencedLabels = new TrivialHashtable();
   Looker looker = new Looker(null, errorHandler, null, ambiguousTypes, referencedLabels);
   looker.currentType = currentType;
   looker.currentModule = this.currentSymbolTable;
   looker.currentAssembly = looker.currentModule as AssemblyNode;
   result = looker.GetVisibleTypesNamespacesAndPrefixes(scope, constructorMustBeVisible, listAllUnderRootNamespace);
   return result;
 }
开发者ID:hesam,项目名称:SketchSharp,代码行数:16,代码来源:LanguageService.cs


示例18: 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);
            foreach (Match m in mc)
            {
                CategorySub c = new CategorySub();
                c.Id = m.Groups[1].Value;
                c.Name = m.Groups[2].Value;

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

            }

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


示例19: VisitMemberList

        public override void VisitMemberList(MemberList members)
        {
            if (members == null) return;

            for (int i = 0, n = members.Count; i < n; i++)
            {
                var type = members[i] as TypeNode;

                if (type == null) continue;

                Class c = type as Class;
                if (c != null && HelperMethods.IsContractTypeForSomeOtherType(c))
                {
                    members[i] = null;
                }
                else
                {
                    // for nested types
                    this.VisitTypeNode(type);
                }
            }
        }
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:22,代码来源:RemoveContractClasses.cs


示例20: OnEventHandling

    public void OnEventHandling(int node, NetEventState state)
    {
        string str = "Node:" + node + " type:" + state.type.ToString() + " State:" + state.type + "[" + state.result + "]";
        Debug.Log("OnEventHandling called");
        Debug.Log(str);

        switch (state.type) {
        case NetEventType.Connect: {
            MemberList member = new MemberList();

            member.node = node;
            member.endPoint = network_.GetEndPoint(node);

            m_members.Add(node, member);
        } 	break;

        case NetEventType.Disconnect: {

            if (m_members.ContainsKey(node)) {

                int roomId = m_members[node].roomId;
                if (rooms_.ContainsKey(roomId)) {
                    for (int i = 0; i < rooms_[roomId].members.Length; ++i) {
                        if (rooms_[roomId].members[i] == node) {
                            rooms_[roomId].members[i] = -1;
                            break;
                        }
                    }
                }

                m_members.Remove(node);
            }
        }	break;

        }
    }
开发者ID:lastone9182,项目名称:NetworkProgramming,代码行数:36,代码来源:MatchingServer.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# MemberMapper类代码示例发布时间:2022-05-24
下一篇:
C# MemberKind类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap