示例#1
0
        public static bool ForceRescan(DataConfig providerConfig, POCO.SharePoint.SPFile file)
        {
            POCO.FileBatchStatus batchstatus = new FileBatchStatus(file.PartitionKey, file.RowKey);
            batchstatus.BatchGuid             = Guid.Empty;
            batchstatus.BatchStatus           = string.Empty;
            batchstatus.JsonFileProcessResult = "{}";

            string tableName = string.Empty;

            switch (providerConfig.ProviderType)
            {
            case "azure.tableservice":
                tableName = POCO.TableNames.Azure.SharePoint.SPFile;
                break;

            case "internal.mongodb":
                tableName = POCO.TableNames.Mongo.SharePoint.SPFile;
                break;

            default:
                throw new ApplicationException("Unknown provider type: " + providerConfig.ProviderType);
                break;
            }

            DataFactory.File.UpdateFileBatchStatus(providerConfig, batchstatus, tableName);

            return(true);
        }
        public static bool ForceRescan(DataConfig providerConfig, POCO.SakaiFile file)
        {
            POCO.FileBatchStatus batchstatus = new FileBatchStatus(file.PartitionKey, file.RowKey);
            batchstatus.BatchGuid             = Guid.Empty;
            batchstatus.BatchStatus           = string.Empty;
            batchstatus.JsonFileProcessResult = "{}";

            DataFactory.File.UpdateFileBatchStatus(providerConfig, batchstatus, "ntfsfiles");

            return(true);
        }