internal static MetadataException WritingTableAnchorError(string tableName, string anchorType, string source, string helpLink, SyncErrorNumber code) { MetadataException metadataException = new MetadataException(SyncResource.FormatString("Internal_SetTableAnchorFailed", (object)anchorType, (object)tableName)); metadataException.SyncSource = source; metadataException.SyncStage = SyncStage.WritingMetadata; metadataException.ErrorNumber = code; metadataException.HelpLink = helpLink; metadataException.TableName = tableName; SyncTracer.Warning("{0}", new object[1] { (object)metadataException }); return(metadataException); }
internal static SchemaException ReadingSchemaFromDataSetError(Collection <string> tableNames, string source, string helpLink, SyncErrorNumber code, Exception inner) { StringBuilder stringBuilder = new StringBuilder(); foreach (string str in tableNames) { stringBuilder.Append(str).Append(", "); } string str1 = ""; if (stringBuilder.Length > 2 && ((object)stringBuilder).ToString().EndsWith(", ", StringComparison.Ordinal)) { str1 = ((object)stringBuilder).ToString().Substring(0, stringBuilder.Length - 2); } SchemaException schemaException = new SchemaException(SyncResource.FormatString("ServerSyncProvider_GetSchemaFromDatabase_Failed", new object[1] { (object)str1 }), inner); schemaException.SyncSource = source; schemaException.SyncStage = SyncStage.ReadingSchema; schemaException.ErrorNumber = code; schemaException.TableName = str1; schemaException.HelpLink = helpLink; SyncTracer.Warning("{0}", new object[1] { (object)schemaException }); return(schemaException); }