示例#1
0
        /// <summary>
        /// Creates an instance of this class using the provided decorator strings
        /// </summary>
        /// <param name="entityDecoratorFormat">The format string to decorate database entities</param>
        /// <param name="literalDecoratorFormat">The format string to decorate literals (strings)</param>
        /// <param name="parameterDecoratorFormat">The format string to decorate parameters</param>
        /// <param name="reader"> </param>
        /// <param name="writer"> </param>
        public SpatialDbUtility(string entityDecoratorFormat, string literalDecoratorFormat, string parameterDecoratorFormat,
                                IBinaryGeometryReader reader, IBinaryGeometryWriter writer)
        {
            EntityDecoratorFormat    = entityDecoratorFormat;
            LiteralDecoratorFormat   = literalDecoratorFormat;
            ParameterDecoratorFormat = parameterDecoratorFormat;

            //This won't do anything to the geometry
            ToEnvelopeDecoratorFormat = "{0}";
            ToGeometryDecoratorFormat = "{0}";
            SetSridDecoratorFormat    = "{0}";
            TransformDecoratorFormat  = "{0}";

            Reader = reader;
            Writer = writer;
        }
示例#2
0
        /// <summary>
        /// Creates an instance of this class using the provided decorator strings
        /// </summary>
        /// <param name="entityDecoratorFormat">The format string to decorate database entities</param>
        /// <param name="literalDecoratorFormat">The format string to decorate literals (strings)</param>
        /// <param name="parameterDecoratorFormat">The format string to decorate parameters</param>
        /// <param name="reader"> </param>
        /// <param name="writer"> </param>
        public SpatialDbUtility(string entityDecoratorFormat, string literalDecoratorFormat, string parameterDecoratorFormat,
            IBinaryGeometryReader reader, IBinaryGeometryWriter writer)
        {
            EntityDecoratorFormat = entityDecoratorFormat;
            LiteralDecoratorFormat = literalDecoratorFormat;
            ParameterDecoratorFormat = parameterDecoratorFormat;

            //This won't do anything to the geometry
            ToEnvelopeDecoratorFormat = "{0}";
            ToGeometryDecoratorFormat = "{0}";
            SetSridDecoratorFormat = "{0}";
            TransformDecoratorFormat = "{0}";

            Reader = reader;
            Writer = writer;
        }
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public GeometryValueConverter(IBinaryGeometryReader reader, IBinaryGeometryWriter writer)
     : base(
         g => new SqlBytes(writer.Write(g)),
         b => (TGeometry)reader.Read(b.Value))
 {
 }
示例#4
0
 internal NetTopologySuiteHandler(IBinaryGeometryReader reader, IBinaryGeometryWriter writer)
 {
     _reader = reader;
     _writer = writer;
 }