Пример #1
0
 /// <summary>
 /// Initializes a <see cref="PropertyMapper"/> that maps a property's assigned value's <see cref="ValueContentAbstractValue"/> to a <see cref="PropertySetAbstractValueKind"/>.
 /// </summary>
 /// <param name="propertyName">Name of the property.</param>
 /// <param name="mapFromValueContentAbstractValueCallback">Callback that implements the mapping.</param>
 /// <param name="propertyIndex">Internal index into the <see cref="PropertySetAbstractValueKind"/> array.</param>
 /// <remarks>This overload is useful if there are properties that effectively aliases of the same underlying value.</remarks>
 public PropertyMapper(string propertyName, ValueContentAbstractValueCallback mapFromValueContentAbstractValueCallback, int propertyIndex)
 {
     PropertyName = propertyName ?? throw new ArgumentNullException(nameof(propertyName));
     MapFromValueContentAbstractValue = mapFromValueContentAbstractValueCallback ?? throw new ArgumentNullException(nameof(mapFromValueContentAbstractValueCallback));
     PropertyIndex = propertyIndex;
     if (propertyIndex < 0)
     {
         throw new ArgumentOutOfRangeException(nameof(propertyIndex), "propertyIndex must be non-negative");
     }
 }
Пример #2
0
 /// <summary>
 /// Initializes a <see cref="ConstructorMapper"/> that maps a constructor invocation's arguments' <see cref="ValueContentAbstractValue"/>s to <see cref="PropertySetAbstractValueKind"/>s for the properties being tracked by PropertySetAnalysis.
 /// </summary>
 /// <param name="mapFromValueContentAbstractValueCallback">Callback that implements the mapping.</param>
 public ConstructorMapper(ValueContentAbstractValueCallback mapFromValueContentAbstractValueCallback)
 {
     this.MapFromValueContentAbstractValue = mapFromValueContentAbstractValueCallback ?? throw new ArgumentNullException(nameof(mapFromValueContentAbstractValueCallback));
     this.PropertyAbstractValues           = ImmutableArray <PropertySetAbstractValueKind> .Empty;
 }
Пример #3
0
 /// <summary>
 /// Initializes a <see cref="PropertyMapper"/> that maps a property's assigned value's <see cref="ValueContentAbstractValue"/> to a <see cref="PropertySetAbstractValueKind"/>.
 /// </summary>
 /// <param name="propertyName">Name of the property.</param>
 /// <param name="mapFromValueContentAbstractValueCallback">Callback that implements the mapping.</param>
 public PropertyMapper(string propertyName, ValueContentAbstractValueCallback mapFromValueContentAbstractValueCallback)
 {
     PropertyName = propertyName ?? throw new ArgumentNullException(nameof(propertyName));
     MapFromValueContentAbstractValue = mapFromValueContentAbstractValueCallback ?? throw new ArgumentNullException(nameof(mapFromValueContentAbstractValueCallback));
 }