コード例 #1
0
        public static MockMemberInfo <T> SetDeclaringType <T>(this MockMemberInfo <T> @this, Type declaringType)
            where T : MemberInfo
        {
            @this.DeclaringType = declaringType;

            return(@this);
        }
コード例 #2
0
        public static MockMemberInfo <T> AddCustomAttribute <T>(this MockMemberInfo <T> @this, Action <MockCustomAttributeData>?setup = null)
            where T : MemberInfo
        {
            var mockCustomAttribute = new MockCustomAttributeData();

            setup?.Invoke(mockCustomAttribute);

            @this.MockCustomAttributes.Add(mockCustomAttribute);

            return(@this);
        }