Beispiel #1
0
        public StaticFile( string fullPath, DataProviderContext context, string storeId, string providerRoot)
        {
            string websitePath = PathUtil.GetWebsitePath(fullPath);
            string providerRelativePath = websitePath.Substring(providerRoot.Length - 1);

            Id = CalculateId(providerRelativePath);
            DownloadUrl = websitePath;
            FileName = Path.GetFileName(providerRelativePath);
            FolderPath = Path.GetDirectoryName(providerRelativePath).Replace("\\","/");
            StoreId = storeId;
            DataSourceId = context.CreateDataSourceId( new MediaDataId { Id = this.Id, MediaType = MediaElementType.File }, typeof(IMediaFile) );
            CreationTime = DateTime.MinValue;
            LastWriteTime = DateTime.MinValue;
            Length = 0;
        }
Beispiel #2
0
        public StaticFolder(string fullPath, DataProviderContext context, string storeId, string providerRoot)
        {
            string websitePath = PathUtil.GetWebsitePath(fullPath);
            string providerRelativePath = websitePath.Substring(providerRoot.Length - 1);

            Id = CalculateId(providerRelativePath);
            StoreId = storeId;
            DataSourceId = context.CreateDataSourceId(new MediaDataId { Id = this.Id, MediaType = MediaElementType.Folder }, typeof(IMediaFileFolder));

            Description = "";
            Title = System.IO.Path.GetFileName(providerRelativePath);
            StoreId = storeId;
            Path = providerRelativePath;

            KeyPath = storeId + ":" + Id;
            CompositePath = storeId + ":" + providerRelativePath;
        }
Beispiel #3
0
        public IData GetDataByDataId(IDataId dataId, DataProviderContext dataProivderContext)
        {
            SqlDataTypeStoreTable storage = GetCurrentTable();

            return storage.SqlDataProviderHelper.GetDataById(GetQueryable(), dataId, dataProivderContext);
        }
Beispiel #4
0
        public IData AddNew(IData dataToAdd, DataProviderContext dataProivderContext, DataContext dataContext)
        {
            SqlDataTypeStoreTable storeTable = GetCurrentTable();

            return storeTable.SqlDataProviderHelper.AddData((ISqlDataContext)dataContext, dataToAdd, dataProivderContext);
        }