public GenericNameValue ToArgs() { GenericNameValue prop = new GenericNameValue(); prop["ServerPath"] = ServerPath; prop["QueueName"] = QueueName; prop["Mode"] = ((int)Mode).ToString(); prop["IsTrans"] = IsTrans.ToString(); prop["MaxRetry"] = MaxRetry.ToString(); prop["ReloadOnStart"] = ReloadOnStart.ToString(); return(prop); }
public static QProperties Get(GenericNameValue gnv) { QProperties mqp = new QProperties() { QueueName = gnv.Get("QueueName"), ServerPath = gnv.Get("ServerPath", "localhost"), Mode = (CoverMode)gnv.Get <int>("Mode", (int)CoverMode.Memory), IsTrans = gnv.Get <bool>("IsTrans", false), MaxRetry = (byte)gnv.Get <byte>("MaxRetry", DefaultMaxRetry), ReloadOnStart = gnv.Get <bool>("ReloadOnStart", false) }; return(mqp); }
public static QProperties Get(GenericNameValue gnv) { QProperties mqp = new QProperties() { QueueName = gnv.Get("QueueName"), ServerPath = gnv.Get("ServerPath", "localhost"), Mode = (CoverMode)gnv.Get <byte>("Mode", (byte)CoverMode.Memory), IsTrans = gnv.Get <bool>("IsTrans", false), MaxRetry = (byte)gnv.Get <byte>("MaxRetry", DefaultMaxRetry), ReloadOnStart = gnv.Get <bool>("ReloadOnStart", false), TargetPath = gnv.Get("TargetPath", null), IsTopic = gnv.Get <bool>("IsTopic", false), CommitMode = (PersistCommitMode)gnv.Get <byte>("CommitMode", (byte)PersistCommitMode.None), }; return(mqp); }