C# Class Zetetic.Ldap.LdifWriter

Inheritance: IDisposable
Afficher le fichier Open project: skradel/Zetetic.Ldap Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

BeginEntry() public méthode

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
Résultat void

Close() public méthode

Close out the stream; optionally write a summary of execution time and entry count.
public Close ( ) : void
Résultat void

Dispose() public méthode

Just close the output stream (if this LdifWriter owns it) without adding a newline or summary.
public Dispose ( ) : void
Résultat void

EndEntry() public méthode

Write a blank line to mark the end of the current entry
public EndEntry ( ) : void
Résultat void

IsSafeInitChar() protected static méthode

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
Résultat bool

IsSafeString() protected static méthode

Per http://www.faqs.org/rfcs/rfc2849.html
protected static IsSafeString ( string value ) : bool
value string
Résultat bool

LdifWriter() public méthode

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
Résultat System

LdifWriter() public méthode

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
Résultat System

ModRdn() public méthode

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
Résultat void

WriteAttr() public méthode

Write a DateTime to the stream in Generalized UTC format.
public WriteAttr ( string attrName, System.DateTime value ) : void
attrName string
value System.DateTime
Résultat void

WriteAttr() public méthode

Write a binary attribute to the stream in Base64 encoding.
public WriteAttr ( string attrName, byte value ) : void
attrName string
value byte
Résultat void

WriteAttr() public méthode

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
Résultat void

WriteChangeSeparator() public méthode

Emit a single hyphen on a line; useful for generating 'changetype: modify' instructions.
public WriteChangeSeparator ( ) : void
Résultat void

WriteComment() public méthode

Write a #-notated comment line to the stream.
public WriteComment ( string comment ) : void
comment string
Résultat void

WriteFolded() protected méthode

Convenience method that calls String.Format on its arguments.
protected WriteFolded ( string fmt ) : void
fmt string
Résultat void