Beispiel #1
0
        public static void DynamicInvoke_DefaultParameter_ReferenceTypeParameterWithExplicitValue()
        {
            CustomReferenceType referenceInstance = new CustomReferenceType();

            Assert.Same(
                referenceInstance,
                (new ReferenceWithDefaultValue(ReferenceMethod)).DynamicInvoke(new object[] { referenceInstance }));
        }
Beispiel #2
0
        public void ReturnsTrueForCustomReferenceType()
        {
            // Arrange
            var types = new TypesWithIsOperator();
            var value = new CustomReferenceType();

            // Act
            var result = types.IsCustomReferenceType(value);

            // Assert
            Assert.True(result);
        }
Beispiel #3
0
 private static CustomReferenceType ReferenceMethod(CustomReferenceType parameter)
 {
     return(parameter);
 }
Beispiel #4
0
 public CustomReferenceType Reference(CustomReferenceType parameter = null) => parameter;
 public CustomReferenceType Reference(CustomReferenceType parameter = null)
 {
     return(parameter);
 }
Beispiel #6
0
 private static CustomReferenceType ReferenceMethod(CustomReferenceType parameter)
 {
     return parameter;
 }
Beispiel #7
0
 public static void DynamicInvoke_DefaultParameter_ReferenceTypeParameterWithExplicitValue()
 {
     CustomReferenceType referenceInstance = new CustomReferenceType();
     Assert.Same(
         referenceInstance,
         (new ReferenceWithDefaultValue(ReferenceMethod)).DynamicInvoke(new object[] { referenceInstance }));
 }
 public FooWithCustomReferenceTypeSetToNull(CustomReferenceType value = null)
 {
     Value = value;
 }
 public CustomReferenceType Reference(CustomReferenceType parameter = null)
 {
     return parameter;
 }