public override DbGeometry GeometryFromProviderValue(object providerValue)
        {
            providerValue.CheckNull("providerValue");
            object normalizedProviderValue = NormalizeProviderValue(providerValue, this.SqlTypes.SqlGeometryType);

            return(this.SqlTypes.IsSqlGeometryNull(normalizedProviderValue) ? null : DbSpatialServices.CreateGeometry(this, normalizedProviderValue));
        }
 public override DbGeometry GeometryFromProviderValue(object providerValue)
 {
     return
         (providerValue == null || ((dynamic)providerValue).IsNull ?
          null :
          DbSpatialServices.CreateGeometry(this, providerValue));
 }
예제 #3
0
        public override DbGeometry GeometryFromText(string geometryText)
        {
            geometryText.CheckNull("geometryText");
            ReadOnlySpatialValues backingValue = new ReadOnlySpatialValues(DbGeometry.DefaultCoordinateSystemId, textValue: geometryText, binaryValue: null, gmlValue: null);

            return(DbSpatialServices.CreateGeometry(this, backingValue));
        }
예제 #4
0
        public override DbGeometry GeometryFromGml(string geometryMarkup, int spatialReferenceSystemId)
        {
            geometryMarkup.CheckNull("geometryMarkup");
            ReadOnlySpatialValues backingValue = new ReadOnlySpatialValues(spatialReferenceSystemId, textValue: null, binaryValue: null, gmlValue: geometryMarkup);

            return(DbSpatialServices.CreateGeometry(this, backingValue));
        }
예제 #5
0
        public override DbGeometry GeometryFromBinary(byte[] geometryBinary, int spatialReferenceSystemId)
        {
            geometryBinary.CheckNull("geometryBinary");
            ReadOnlySpatialValues backingValue = new ReadOnlySpatialValues(spatialReferenceSystemId, textValue: null, binaryValue: geometryBinary, gmlValue: null);

            return(DbSpatialServices.CreateGeometry(this, backingValue));
        }
예제 #6
0
 public override DbGeometry GeometryFromGml(
     string geometryMarkup,
     int spatialReferenceSystemId)
 {
     Check.NotNull <string>(geometryMarkup, nameof(geometryMarkup));
     return(DbSpatialServices.CreateGeometry((DbSpatialServices)this, (object)new DefaultSpatialServices.ReadOnlySpatialValues(spatialReferenceSystemId, (string)null, (byte[])null, geometryMarkup)));
 }
예제 #7
0
 public override DbGeometry GeometryFromBinary(
     byte[] geometryBinary,
     int spatialReferenceSystemId)
 {
     Check.NotNull <byte[]>(geometryBinary, nameof(geometryBinary));
     return(DbSpatialServices.CreateGeometry((DbSpatialServices)this, (object)new DefaultSpatialServices.ReadOnlySpatialValues(spatialReferenceSystemId, (string)null, geometryBinary, (string)null)));
 }
예제 #8
0
 public override DbGeometry GeometryFromText(string geometryText)
 {
     Check.NotNull <string>(geometryText, nameof(geometryText));
     return(DbSpatialServices.CreateGeometry((DbSpatialServices)this, (object)new DefaultSpatialServices.ReadOnlySpatialValues(DbGeometry.DefaultCoordinateSystemId, geometryText, (byte[])null, (string)null)));
 }
예제 #9
0
 public override DbGeometry GeometryFromProviderValue(object providerValue)
 {
     Check.NotNull <object>(providerValue, nameof(providerValue));
     return(DbSpatialServices.CreateGeometry((DbSpatialServices)this, (object)DefaultSpatialServices.CheckProviderValue(providerValue)));
 }