private Feature(FeatureFactory <T> factory, T oid, IGeometry geometry, FeatureAttributes <T> attributes) { _factory = factory; _attributes = attributes; Geometry = geometry; Oid = oid; }
/// <summary> /// Creates an instance of this class, using the values provided in the <paramref name="attributes"/> collection /// </summary> /// <param name="attributes">A reference collection</param> private FeatureAttributes(FeatureAttributes <T> attributes) { if (attributes == null) { throw new ArgumentNullException("attributes"); } _feature = attributes._feature; _attributes = new object[_feature.Factory.AttributesDefinition.Count]; for (var i = 0; i < _attributes.Length; i++) { var value = attributes._attributes[i]; if (value is ICloneable) { value = ((ICloneable)value).Clone(); } _attributes[i] = value; } }
/// <summary> /// Creates a feature /// </summary> /// <param name="factory">The factory that created the feature</param> internal Feature(FeatureFactory <T> factory) { _factory = factory; _attributes = new FeatureAttributes <T>(this); }