public static bool Attach(string suffix, bool throwException)
        {
            operationalFacade   = null;
            operationalUIFacade = null;

            if (suffix == null)
            {
                suffix = string.Empty;
            }

            try {
                operationalFacade   = (OperationalFacade)od.Resolve("OperationalService" + suffix);
                operationalUIFacade = (OperationalUIFacade)od.Resolve("OperationalUIService" + suffix);

                DatasetSourceFacade  dsfacade  = operationalUIFacade.DatasetFacade;
                DataItemDescriptor[] dataItems = dsfacade.GetDataItems();
                foreach (DataItemDescriptor item in dataItems)
                {
                    if (!dataset.ContainsKey(item.Name))
                    {
                        dataset.Add(item);
                    }
                }

                dataset.AttachToSource(dsfacade);
            }
            catch (Exception) {
                operationalFacade   = null;
                operationalUIFacade = null;

                if (throwException)
                {
                    throw;
                }
                else
                {
                    return(false);
                }
            }

            if (Attached != null)
            {
                Attached(null, new AttachEventArgs(string.IsNullOrEmpty(suffix) ? string.Empty : suffix.Substring(1)));
            }

            return(true);
        }
        public UIService()
        {
            if (Services.Dataset == null)
            {
                throw new InvalidOperationException("Dataset must be initialized before creating UIService");
            }

            if (Services.Params == null)
            {
                throw new InvalidOperationException("TunableParameterTable must be intialized before creating UIService");
            }

            datasetFacade = new DatasetSourceFacade(Services.Dataset);
            paramFacade   = new TunableParameterFacade(Services.Params);

            // list in the object directory
            if (!Settings.TestMode)
            {
                CommBuilder.BindObject(OperationalUIFacade.ServiceName, this);
            }
        }