Пример #1
0
 internal override ReadOnlyPSMemberInfoCollection <T> Match(string name, PSMemberTypes memberTypes, MshMemberMatchOptions matchOptions)
 {
     using (PSObject.memberResolution.TraceScope("Matching \"{0}\"", new object[] { name }))
     {
         if (string.IsNullOrEmpty(name))
         {
             throw PSTraceSource.NewArgumentException("name");
         }
         if (this.mshOwner != null)
         {
             this.GenerateAllReservedMembers();
         }
         WildcardPattern namePattern = MemberMatch.GetNamePattern(name);
         ReadOnlyPSMemberInfoCollection <T> infos = new ReadOnlyPSMemberInfoCollection <T>(MemberMatch.Match <T>(this.GetIntegratedMembers(matchOptions), name, namePattern, memberTypes));
         PSObject.memberResolution.WriteLine("{0} total matches.", new object[] { infos.Count });
         return(infos);
     }
 }
 internal override ReadOnlyPSMemberInfoCollection <T> Match(
     string name,
     PSMemberTypes memberTypes,
     MshMemberMatchOptions matchOptions)
 {
     if (string.IsNullOrEmpty(name))
     {
         throw PSMemberInfoInternalCollection <T> .tracer.NewArgumentException(nameof (name));
     }
     return(new ReadOnlyPSMemberInfoCollection <T>(MemberMatch.Match <T>(this.GetInternalMembers(matchOptions), name, MemberMatch.GetNamePattern(name), memberTypes)));
 }