You've already forked linux-packaging-mono
Imported Upstream version 5.4.0.167
Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
parent
e49d6f06c0
commit
536cd135cc
69
external/api-doc-tools/monodoc/Monodoc/storage/UncompiledDocStorage.cs
vendored
Normal file
69
external/api-doc-tools/monodoc/Monodoc/storage/UncompiledDocStorage.cs
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Monodoc.Storage
|
||||
{
|
||||
// A read-only storage to access ecma XML document based on a standard directory layout
|
||||
// id are relative path inside the base doc directory
|
||||
public class UncompiledDocStorage : IDocStorage
|
||||
{
|
||||
readonly string basePath;
|
||||
|
||||
public UncompiledDocStorage (string basePath)
|
||||
{
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
||||
public bool SupportRevision {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public IDocRevisionManager RevisionManager {
|
||||
get {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public bool SupportChange {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public string Store (string id, string text)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public string Store (string id, byte[] data)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public string Store (string id, Stream stream)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public Stream Retrieve (string id)
|
||||
{
|
||||
var path = id;
|
||||
if ('/' != Path.DirectorySeparatorChar)
|
||||
path = path.Replace ('/', Path.DirectorySeparatorChar);
|
||||
return File.OpenRead (Path.Combine (basePath, path));
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetAvailableIds ()
|
||||
{
|
||||
return Directory.EnumerateFiles (basePath, "*.xml", SearchOption.AllDirectories);
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user