public SlpService(string slpLang) { Attributes = new Dictionary <string, string>(); SlpError err = SlpNativeMethods.Open(slpLang, SlpBoolean.False, ref hSlp); if (err != SlpError.OK) { throw new SlpException(err); } }
public SlpClient(string slpLang) { // try async mode first SlpError err = SlpNativeMethods.Open(slpLang, SlpBoolean.True, ref hSlp); IsAsync = true; if (err == SlpError.NOT_IMPLEMENTED) { err = SlpNativeMethods.Open(slpLang, SlpBoolean.False, ref hSlp); IsAsync = false; } if (err != SlpError.OK) { throw new SlpException(err); } }
public SlpException(SlpError err) : base(String.Format("SLP_{0}", err.ToString())) { Error = err; }
public SlpException( SlpError err ) : base(String.Format("SLP_{0}", err.ToString() )) { Error = err; }