/// <summary> /// Creates a new instance of the safe property wrapper. /// </summary> /// <param name="propertyInfo">Property to wrap.</param> public SafeProperty(PropertyInfo propertyInfo) { Guard.ArgumentNotNull(propertyInfo, "propertyInfo", "You cannot create a dynamic property for a null value."); this.propertyInfo = propertyInfo; getter = DynamicReflectionManager.CreatePropertyGetter(propertyInfo); setter = DynamicReflectionManager.CreatePropertySetter(propertyInfo); }