예제 #1
0
            private void SubstituteProperty([NotNull] PropertyDefinition propertyDef, [NotNull] ISubstitutionMap substitutionMap)
            {
                var propertySubstitutionMap = propertyDef.CreateSubstitutionMap(_defaultParameters, substitutionMap);

                if (!ReferenceEquals(substitutionMap, propertySubstitutionMap))
                {
                    CheckRecursion(propertySubstitutionMap);
                }

                propertyDef.PropertyType = SubstituteSignature(propertyDef.PropertyType, propertySubstitutionMap);

                if (propertyDef.GetMethod != null)
                {
                    SubstituteMethod(propertyDef.GetMethod, propertySubstitutionMap);
                }
                if (propertyDef.SetMethod != null)
                {
                    SubstituteMethod(propertyDef.SetMethod, propertySubstitutionMap);
                }
                if (propertyDef.HasOtherMethods)
                {
                    foreach (var otherMethod in propertyDef.OtherMethods)
                    {
                        SubstituteMethod(otherMethod, propertySubstitutionMap);
                    }
                }
            }