Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
 public SlpException(SlpError err) : base(String.Format("SLP_{0}", err.ToString()))
 {
     Error = err;
 }
Esempio n. 4
0
 public SlpException( SlpError err )
     : base(String.Format("SLP_{0}", err.ToString() ))
 {
     Error = err;
 }