Пример #1
0
 /// <summary>
 /// Initializes a <see cref="PropertyMapper"/> that maps a property's assigned value's <see cref="NullAbstractValue"/> to a <see cref="PropertySetAbstractValueKind"/>.
 /// </summary>
 /// <param name="propertyName">Name of the property.</param>
 /// <param name="mapFromPointsToAbstractValueCallback">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, PointsToAbstractValueCallback mapFromPointsToAbstractValueCallback, int propertyIndex)
 {
     PropertyName = propertyName ?? throw new ArgumentNullException(nameof(propertyName));
     MapFromPointsToAbstractValue = mapFromPointsToAbstractValueCallback ?? throw new ArgumentNullException(nameof(mapFromPointsToAbstractValueCallback));
     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="NullAbstractValue"/>s to <see cref="PropertySetAbstractValueKind"/>s for the properties being tracked by PropertySetAnalysis.
 /// </summary>
 /// <param name="mapFromPointsToAbstractValueCallback">Callback that implements the mapping.</param>
 public ConstructorMapper(PointsToAbstractValueCallback mapFromPointsToAbstractValueCallback)
 {
     this.MapFromPointsToAbstractValue = mapFromPointsToAbstractValueCallback ?? throw new ArgumentNullException(nameof(mapFromPointsToAbstractValueCallback));
     this.PropertyAbstractValues       = ImmutableArray <PropertySetAbstractValueKind> .Empty;
 }
Пример #3
0
 /// <summary>
 /// Initializes a <see cref="PropertyMapper"/> that maps a property's assigned value's <see cref="NullAbstractValue"/> to a <see cref="PropertySetAbstractValueKind"/>.
 /// </summary>
 /// <param name="propertyName">Name of the property.</param>
 /// <param name="mapFromPointsToAbstractValueCallback">Callback that implements the mapping.</param>
 public PropertyMapper(string propertyName, PointsToAbstractValueCallback mapFromPointsToAbstractValueCallback)
 {
     PropertyName = propertyName ?? throw new ArgumentNullException(nameof(propertyName));
     MapFromPointsToAbstractValue = mapFromPointsToAbstractValueCallback ?? throw new ArgumentNullException(nameof(mapFromPointsToAbstractValueCallback));
 }