示例#1
0
        internal static DataSyncException AnotherSyncInProgressError(string source, string helpLink)
        {
            DataSyncException dataSyncException = new DataSyncException(SyncResource.GetString("SyncAlreadyStarted"), (Exception)null);

            dataSyncException.SyncSource  = source;
            dataSyncException.HelpLink    = helpLink;
            dataSyncException.SyncStage   = SyncStage.ReadingMetadata;
            dataSyncException.ErrorNumber = SyncErrorNumber.SyncInProgress;
            SyncTracer.Warning("{0}", new object[1]
            {
                (object)dataSyncException
            });
            return(dataSyncException);
        }
示例#2
0
        internal static DataSyncException EnumeratingChangesError(string source, string helpLink, Exception inner, SyncStage stage)
        {
            DataSyncException dataSyncException = new DataSyncException(SyncResource.GetString("ClientSyncProvider_GetChanges_Failed"), inner);

            dataSyncException.SyncSource  = source;
            dataSyncException.SyncStage   = stage;
            dataSyncException.ErrorNumber = SyncErrorNumber.StoreException;
            dataSyncException.HelpLink    = helpLink;
            SyncTracer.Warning("{0}", new object[1]
            {
                (object)dataSyncException
            });
            return(dataSyncException);
        }
示例#3
0
        internal static SchemaException MissingSelectStatementError(string tableName, string source, string helpLink)
        {
            SchemaException schemaException = new SchemaException(SyncResource.GetString("SyncAdapter_FillSchema_SelectCommandMissing"));

            schemaException.SyncSource  = source;
            schemaException.SyncStage   = SyncStage.ReadingSchema;
            schemaException.ErrorNumber = SyncErrorNumber.MissingSelectCommand;
            schemaException.TableName   = tableName;
            schemaException.HelpLink    = helpLink;
            SyncTracer.Warning("{0}", new object[1]
            {
                (object)schemaException
            });
            return(schemaException);
        }
示例#4
0
        internal static SchemaException InvalidSchemaDataSetError(string tableName, string source, string helpLink)
        {
            SchemaException schemaException = new SchemaException(SyncResource.GetString("ServerSyncProvider_Invalid_Schema_dataset"));

            schemaException.SyncSource  = source;
            schemaException.SyncStage   = SyncStage.ReadingSchema;
            schemaException.ErrorNumber = SyncErrorNumber.InvalidSchemaDataSet;
            schemaException.TableName   = tableName;
            schemaException.HelpLink    = helpLink;
            SyncTracer.Warning("{0}", new object[1]
            {
                (object)schemaException
            });
            return(schemaException);
        }
示例#5
0
        internal static AnchorException ReadingAnchorError(SyncGroupMetadata metadata, SyncSession session, string source, string helpLink, Exception inner)
        {
            AnchorException anchorException = new AnchorException(SyncResource.GetString("GetNewServerAnchorFailed"), inner);

            anchorException.SyncSource    = source;
            anchorException.SyncStage     = SyncStage.DownloadingChanges;
            anchorException.ErrorNumber   = SyncErrorNumber.StoreException;
            anchorException.GroupMetadata = metadata;
            anchorException.HelpLink      = helpLink;
            anchorException.Session       = session;
            SyncTracer.Warning("{0}", new object[1]
            {
                (object)anchorException
            });
            return(anchorException);
        }
示例#6
0
 internal static string FormatString(string key, params object[] a1)
 {
     return(string.Format((IFormatProvider)CultureInfo.InvariantCulture, SyncResource.GetString(key), a1));
 }
示例#7
0
 internal static ArgumentException MaxSizeOfCustomParameter()
 {
     return(SyncExpt.Argument(SyncResource.GetString("MaxSizeOfCustomParameter")));
 }
示例#8
0
 internal static ArgumentException InvalidConnectionArgument()
 {
     return(SyncExpt.Argument(SyncResource.GetString("InvalidConnectionArgument")));
 }
示例#9
0
        internal static InvalidOperationException DynamicSQLNoTableInfo()
        {
            InvalidOperationException operationException = new InvalidOperationException(SyncResource.GetString("DynamicSQLNoTableInfo"));

            SyncTracer.Warning("{0}", new object[1]
            {
                (object)operationException
            });
            return(operationException);
        }
示例#10
0
        internal static SessionVariableException FailedToMapOriginatorId(SyncStage stage, string source, string helpLink)
        {
            SessionVariableException variableException = new SessionVariableException(SyncResource.GetString("FailedToMapOriginatorId"));

            variableException.ErrorNumber = SyncErrorNumber.MissingSessionVariable;
            variableException.SyncSource  = source;
            variableException.HelpLink    = helpLink;
            variableException.SyncStage   = stage;
            SyncTracer.Warning("{0}", new object[1]
            {
                (object)variableException
            });
            return(variableException);
        }
示例#11
0
        internal static InvalidOperationException NoTableNameError()
        {
            InvalidOperationException operationException = new InvalidOperationException(SyncResource.GetString("NoTableName"));

            SyncTracer.Warning("{0}", new object[1]
            {
                (object)operationException
            });
            return(operationException);
        }
示例#12
0
 internal static Exception InvalidSyncParameterObject()
 {
     return((Exception)SyncExpt.Argument(SyncResource.GetString("InvalidParamObject")));
 }
示例#13
0
 internal static Exception InvalidSyncAdapterObject()
 {
     return((Exception)SyncExpt.Argument(SyncResource.GetString("SyncAdapterCollection_Add_InvalidType")));
 }
示例#14
0
 internal static Exception InvalidSyncGroupName()
 {
     return((Exception)SyncExpt.Argument(SyncResource.GetString("InvalidGroupName"), "GroupName"));
 }