示例#1
0
 private Feature(FeatureFactory <T> factory, T oid, IGeometry geometry, FeatureAttributes <T> attributes)
 {
     _factory    = factory;
     _attributes = attributes;
     Geometry    = geometry;
     Oid         = oid;
 }
示例#2
0
        /// <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;
            }
        }
示例#3
0
 /// <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);
 }