C# Класс Zetetic.Ldap.LdifWriter

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BeginEntry ( string dn ) : void

Close out an open entry, if any, and write the DN of the new entry to the stream.

Close ( ) : void

Close out the stream; optionally write a summary of execution time and entry count.

Dispose ( ) : void

Just close the output stream (if this LdifWriter owns it) without adding a newline or summary.

EndEntry ( ) : void

Write a blank line to mark the end of the current entry

LdifWriter ( TextWriter tw ) : System

Create an LdifWriter pointed at an existing output stream; the LdifWriter will not close the stream during Dispose.

LdifWriter ( string path ) : System

Create an LdifWriter for ASCII file output. The stream will close upon Disposing this LdifWriter. Call .Close to wrap up the last entry and write a summary.

ModRdn ( string dn, string newRdn, string newSuperior ) : void

Write a 'modrdn' instruction to LDIF. Optionally specify newSuperior to move the object to a new point in the directory tree; or null/blank for RDN change only.

WriteAttr ( string attrName, System.DateTime value ) : void

Write a DateTime to the stream in Generalized UTC format.

WriteAttr ( string attrName, byte value ) : void

Write a binary attribute to the stream in Base64 encoding.

WriteAttr ( string attrName, string value ) : void

Write a string value to the stream, with testing for 7-bit safety. This will switch to Base64 mode as necessary.

WriteChangeSeparator ( ) : void

Emit a single hyphen on a line; useful for generating 'changetype: modify' instructions.

WriteComment ( string comment ) : void

Write a #-notated comment line to the stream.

Защищенные методы

Метод Описание
IsSafeInitChar ( char c ) : bool

any value <= 127 except NUL, LF, CR, SPACE, colon (":", ASCII 58 decimal) and less-than ("<" , ASCII 60 decimal)

IsSafeString ( string value ) : bool

Per http://www.faqs.org/rfcs/rfc2849.html

WriteFolded ( string fmt ) : void

Convenience method that calls String.Format on its arguments.

Описание методов

BeginEntry() публичный Метод

Close out an open entry, if any, and write the DN of the new entry to the stream.
public BeginEntry ( string dn ) : void
dn string
Результат void

Close() публичный Метод

Close out the stream; optionally write a summary of execution time and entry count.
public Close ( ) : void
Результат void

Dispose() публичный Метод

Just close the output stream (if this LdifWriter owns it) without adding a newline or summary.
public Dispose ( ) : void
Результат void

EndEntry() публичный Метод

Write a blank line to mark the end of the current entry
public EndEntry ( ) : void
Результат void

IsSafeInitChar() защищенный статический Метод

any value <= 127 except NUL, LF, CR, SPACE, colon (":", ASCII 58 decimal) and less-than ("<" , ASCII 60 decimal)
protected static IsSafeInitChar ( char c ) : bool
c char
Результат bool

IsSafeString() защищенный статический Метод

Per http://www.faqs.org/rfcs/rfc2849.html
protected static IsSafeString ( string value ) : bool
value string
Результат bool

LdifWriter() публичный Метод

Create an LdifWriter pointed at an existing output stream; the LdifWriter will not close the stream during Dispose.
public LdifWriter ( TextWriter tw ) : System
tw System.IO.TextWriter
Результат System

LdifWriter() публичный Метод

Create an LdifWriter for ASCII file output. The stream will close upon Disposing this LdifWriter. Call .Close to wrap up the last entry and write a summary.
public LdifWriter ( string path ) : System
path string
Результат System

ModRdn() публичный Метод

Write a 'modrdn' instruction to LDIF. Optionally specify newSuperior to move the object to a new point in the directory tree; or null/blank for RDN change only.
public ModRdn ( string dn, string newRdn, string newSuperior ) : void
dn string
newRdn string
newSuperior string
Результат void

WriteAttr() публичный Метод

Write a DateTime to the stream in Generalized UTC format.
public WriteAttr ( string attrName, System.DateTime value ) : void
attrName string
value System.DateTime
Результат void

WriteAttr() публичный Метод

Write a binary attribute to the stream in Base64 encoding.
public WriteAttr ( string attrName, byte value ) : void
attrName string
value byte
Результат void

WriteAttr() публичный Метод

Write a string value to the stream, with testing for 7-bit safety. This will switch to Base64 mode as necessary.
public WriteAttr ( string attrName, string value ) : void
attrName string
value string
Результат void

WriteChangeSeparator() публичный Метод

Emit a single hyphen on a line; useful for generating 'changetype: modify' instructions.
public WriteChangeSeparator ( ) : void
Результат void

WriteComment() публичный Метод

Write a #-notated comment line to the stream.
public WriteComment ( string comment ) : void
comment string
Результат void

WriteFolded() защищенный Метод

Convenience method that calls String.Format on its arguments.
protected WriteFolded ( string fmt ) : void
fmt string
Результат void