Beispiel #1
0
        public void TestCopyTaskMsSql()
        {
            MockRepository mocks = new MockRepository();
            FdoConnection  conn  = new FdoConnection("OSGeo.SQLServerSpatial", "");

            ICopySpatialContext ctx = CopySpatialContextOverrideFactory.GetCopySpatialContextOverride(conn);

            Assert.IsTrue(ctx is MsSqlCopySpatialContextOverride);
        }
Beispiel #2
0
        public override void ExecuteAction()
        {
            ICopySpatialContext copy = CopySpatialContextOverrideFactory.GetCopySpatialContextOverride(_target);

            copy.Execute(_source, _target, _overwrite, _scNames);
        }
Beispiel #3
0
        /// <summary>
        /// Copies all spatial contexts from one connection to another. If the target connection
        /// only supports one spatial context, then the active spatial context is copied across.
        /// </summary>
        /// <param name="spatialContexts">The spatial contexts.</param>
        /// <param name="target">The target.</param>
        /// <param name="overwrite">if set to <c>true</c> [overwrite].</param>
        public static void CopyAllSpatialContexts(ICollection <SpatialContextInfo> spatialContexts, FdoConnection target, bool overwrite)
        {
            ICopySpatialContext copy = CopySpatialContextOverrideFactory.GetCopySpatialContextOverride(target);

            copy.Execute(spatialContexts, target, overwrite);
        }
Beispiel #4
0
        /// <summary>
        /// Copies all spatial contexts from one connection to another. If the target connection
        /// only supports one spatial context, then the active spatial context is copied across.
        /// </summary>
        /// <param name="source">The source connection</param>
        /// <param name="target">The target connection</param>
        /// <param name="overwrite">If true will overwrite any existing spatial contexts, otherwise it will add them. This value is ignored if the target connection does not support multiple spatial contexts</param>
        public static void CopyAllSpatialContexts(FdoConnection source, FdoConnection target, bool overwrite)
        {
            ICopySpatialContext copy = CopySpatialContextOverrideFactory.GetCopySpatialContextOverride(target);

            copy.Execute(source, target, overwrite);
        }