Skip to content

Commit

Permalink
incremental
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkis117 committed Jul 26, 2016
1 parent ce0ef9a commit 10e29c8
Show file tree
Hide file tree
Showing 7 changed files with 985 additions and 65 deletions.
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>",
"args": [],
"cwd": "${workspaceRoot}",
"externalConsole": false,
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command.pickProcess}"
}
]
}
16 changes: 16 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "0.1.0",
"command": "dotnet",
"isShellCommand": true,
"args": [],
"tasks": [
{
"taskName": "build",
"args": [
""
],
"isBuildCommand": true,
"problemMatcher": "$msCompile"
}
]
}
48 changes: 47 additions & 1 deletion src/GenericMvcUtilities/Models/IModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.IO;

namespace GenericMvcUtilities.Models
{
Expand All @@ -18,5 +19,50 @@ public interface IModelWithFile<TKey> : IModel<TKey>
{
DataFile File { get; set; }
}


public interface IModelWithFilename<TKey> : IModel<TKey>
where TKey : IEquatable<TKey>
{
string Filename { get; set; }
}


/// <summary>
/// todo use this to replace datafile
/// </summary>
/// <typeparam name="TKey">The type of the key.</typeparam>
/// <seealso cref="GenericMvcUtilities.Models.IModel{TKey}" />
public interface IFile<TKey> : IModel<TKey> where TKey : IEquatable<TKey>
{

//replaces Id in File... this is the path to the file
//equal directory name
string Path { get; set; }

//file name as it appears on disk
string Name { get; set; }

/// <summary>
/// mime content type
/// </summary>
string ContentType { get; set; }

/// <summary>
/// encoding type
/// needed to decode data from over the wire transmissions
/// </summary>
EncodingType EncodingType { get; set; }

/// <summary>
/// if file facade this will be null
/// </summary>
byte[] Data { get; set; }


FileInfo FileInfo { get; set; }

bool IsFileBacked();

//FileInfo GetFileInfo();
}
}
Loading

0 comments on commit 10e29c8

Please sign in to comment.