public override PSMemberInfo Copy() { PSCodeMethod destiny = new PSCodeMethod(base.name, this.codeReference[0]); base.CloneBaseProperties(destiny); return(destiny); }
internal void SetCodeReference(Type type, string methodName) { MemberInfo[] member = type.GetMember(methodName, MemberTypes.Method, BindingFlags.IgnoreCase | BindingFlags.Static | BindingFlags.Public); this.codeReference = member.Length == 1 ? new MethodInfo[1] { (MethodInfo)member[0] } : throw new ExtendedTypeSystemException("WrongMethodFormatFromTypeTable", (Exception)null, "ExtendedTypeSystem", "CodeMethodMethodFormat", new object[0]); this.codeReferenceDefinition = new string[1] { DotNetAdapter.GetMethodInfoOverloadDefinition((string)null, (MethodBase)this.codeReference[0], 0) }; this.codeReferenceMethodInformation = DotNetAdapter.GetMethodInformationArray((MethodBase[])this.codeReference); PSCodeMethod.CheckMethodInfo(this.codeReference[0]); }
public override PSMemberInfo Copy() { PSCodeMethod destiny = new PSCodeMethod(base.name, this.codeReference[0]); base.CloneBaseProperties(destiny); return destiny; }