NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Export.DirectoryStreamDestination Class Reference
Inheritance diagram for Ntp.Analyzer.Export.DirectoryStreamDestination:
Collaboration diagram for Ntp.Analyzer.Export.DirectoryStreamDestination:

Public Member Functions

 DirectoryStreamDestination (string path, string prefix)
 Initializes a new instance of the DirectoryStreamDestination class. More...
 
override void Test ()
 
override void Write (Stream stream, LogBase log)
 

Public Attributes

override string AbsoluteLocation => JoinPath(basePath.FilePath, path, prefix)
 
override string Link => JoinPath(value, prefix)
 
override string Location => path
 
override string Value => value
 
- Public Attributes inherited from Ntp.Analyzer.Export.StreamDestination
string ConfigName => null
 StreamDestinations never has a name. Always return null. More...
 

Package Functions

void SetPath (IPathProvider pathProvider)
 

Properties

string ConfigValue [get]
 
- Properties inherited from Ntp.Analyzer.Export.StreamDestination
abstract string AbsoluteLocation [get]
 
abstract string Link [get]
 
abstract string Location [get]
 
string Param [get, set]
 
abstract string Value [get]
 
- Properties inherited from Ntp.Analyzer.Interface.IConfigurationNode
string ConfigName [get]
 

Private Attributes

IPathProvider basePath
 
readonly string path
 
readonly string prefix
 
readonly string value
 

Additional Inherited Members

- Static Public Attributes inherited from Ntp.Analyzer.Export.FileSystemDestination
static uint FileGroupId = null
 
static uint FileMask = 644
 
static uint FileUserId = null
 
- Static Protected Member Functions inherited from Ntp.Analyzer.Export.FileSystemDestination
static void ApplyPermissions (string file, LogBase log)
 
static string JoinPath (string path1, string path2)
 
static string JoinPath (string path1, string path2, string path3)
 
static void PrepareFile (string file, LogBase log)
 
static void TestFile (string file, string content)
 
static void WriteFile (Stream stream, string file, LogBase log)
 

Detailed Description

Definition at line 30 of file DirectoryStreamDestination.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Export.DirectoryStreamDestination.DirectoryStreamDestination ( string  path,
string  prefix 
)
inline

Initializes a new instance of the DirectoryStreamDestination class.

Parameters
pathPath.
prefixPrefix.

Definition at line 37 of file DirectoryStreamDestination.cs.

Member Function Documentation

void Ntp.Analyzer.Export.DirectoryStreamDestination.SetPath ( IPathProvider  pathProvider)
inlinepackage

Definition at line 74 of file DirectoryStreamDestination.cs.

75  {
76  basePath = pathProvider;
77  }
override void Ntp.Analyzer.Export.DirectoryStreamDestination.Test ( )
inlinevirtual

Implements Ntp.Analyzer.Export.StreamDestination.

Definition at line 61 of file DirectoryStreamDestination.cs.

62  {
63  TestFile($"{AbsoluteLocation}configtest", "DirectoryStreamDestinationTest");
64  }
static void TestFile(string file, string content)
override void Ntp.Analyzer.Export.DirectoryStreamDestination.Write ( Stream  stream,
LogBase  log 
)
inlinevirtual

Implements Ntp.Analyzer.Export.StreamDestination.

Definition at line 66 of file DirectoryStreamDestination.cs.

67  {
68  string file = AbsoluteLocation + Param;
69  PrepareFile(file, log);
70  WriteFile(stream, file, log);
71  ApplyPermissions(file, log);
72  }
static void WriteFile(Stream stream, string file, LogBase log)
static void ApplyPermissions(string file, LogBase log)
static void PrepareFile(string file, LogBase log)

Member Data Documentation

override string Ntp.Analyzer.Export.DirectoryStreamDestination.AbsoluteLocation => JoinPath(basePath.FilePath, path, prefix)

Definition at line 59 of file DirectoryStreamDestination.cs.

IPathProvider Ntp.Analyzer.Export.DirectoryStreamDestination.basePath
private

Definition at line 48 of file DirectoryStreamDestination.cs.

override string Ntp.Analyzer.Export.DirectoryStreamDestination.Link => JoinPath(value, prefix)

Definition at line 53 of file DirectoryStreamDestination.cs.

override string Ntp.Analyzer.Export.DirectoryStreamDestination.Location => path

Definition at line 57 of file DirectoryStreamDestination.cs.

readonly string Ntp.Analyzer.Export.DirectoryStreamDestination.path
private

Definition at line 45 of file DirectoryStreamDestination.cs.

readonly string Ntp.Analyzer.Export.DirectoryStreamDestination.prefix
private

Definition at line 46 of file DirectoryStreamDestination.cs.

readonly string Ntp.Analyzer.Export.DirectoryStreamDestination.value
private

Definition at line 47 of file DirectoryStreamDestination.cs.

override string Ntp.Analyzer.Export.DirectoryStreamDestination.Value => value

Definition at line 55 of file DirectoryStreamDestination.cs.

Property Documentation

string Ntp.Analyzer.Export.DirectoryStreamDestination.ConfigValue
get

Definition at line 51 of file DirectoryStreamDestination.cs.


The documentation for this class was generated from the following file: