Ejemplo n.º 1
0
 private static bool GenericHasHandler <T>(ClientCapabilityProvider provider, Supports <T> supports)
     where T : DynamicCapability, ConnectedCapability <IJsonRpcHandler>
 {
     return(provider.HasStaticHandler(supports));
 }
Ejemplo n.º 2
0
 public IOptionsGetter GetStaticOptions <T>(Supports <T> capability)
     where T : DynamicCapability, ConnectedCapability <IJsonRpcHandler>
 {
     return(!HasStaticHandler(capability) ? Null : new OptionsGetter(_collection));
 }
Ejemplo n.º 3
0
 public bool HasStaticHandler <T>(Supports <T> capability)
     where T : ConnectedCapability <IJsonRpcHandler>?, IDynamicCapability?
Ejemplo n.º 4
0
        protected HubMessage ParseMessage(string raw)
        {
            raw = raw.Replace(this.Seperator, "");
            HubMessage msg = new HubMessage(hub, raw);

            if (!string.IsNullOrEmpty(raw))
            {
                switch (raw[0])
                {
                case '$':
                    int    pos;
                    string cmd = null;
                    if ((pos = raw.IndexOf(' ')) != -1)
                    {
                        cmd = raw.Substring(0, pos).ToLower();
                    }
                    else
                    {
                        if (raw.Length >= 10)
                        {
                            break;
                        }
                        cmd = raw.ToLower();
                    }
                    if (cmd == null || cmd.Equals(string.Empty))
                    {
                        break;
                    }
                    switch (cmd)
                    {
                    case "$lock":
                        msg = new Lock(hub, raw); break;

                    case "$supports":
                        msg = new Supports(hub, raw); break;

                    case "$hubname":
                        msg = new HubNmdc.HubName(hub, raw); break;

                    case "$hello":
                        msg = new Hello(hub, raw); break;

                    case "$myinfo":
                        msg = new MyINFO(hub, raw); break;

                    case "$nicklist":
                        msg = new NickList(hub, raw); break;

                    case "$oplist":
                        msg = new OpList(hub, raw); break;

                    case "$to:":
                        msg = new To(hub, raw); break;

                    case "$quit":
                        msg = new Quit(hub, raw); break;

                    case "$getpass":
                        msg = new GetPass(hub, raw); break;

                    case "$logedin":
                        msg = new LogedIn(hub, raw); break;

                    case "$validatedenide":
                        msg = new ValidateDenide(hub, raw); break;

                    case "$forcemove":
                        msg = new ForceMove(hub, raw); break;

                    case "$connecttome":
                        msg = new ConnectToMe(hub, raw); break;

                    case "$revconnecttome":
                        msg = new RevConnectToMe(hub, raw); break;

                    case "$search":
                        msg = new Search(hub, raw); break;

                    case "$sr":
                        msg = new SR(hub, raw); break;
                    }
                    break;

                default:
                    // No command. Assume MainChat.
                    msg = new MainChat(hub, raw);
                    break;
                }
            }
            return(msg);
        }
Ejemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     intProfile = Int32.Parse(Request.Cookies["profileid"].Value);
     oPage      = new Pages(intProfile, dsn);
     oAppPage   = new AppPages(intProfile, dsn);
     oUser      = new Users(intProfile, dsn);
     oSupport   = new Supports(intProfile, dsn);
     if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
     {
         intApplication = Int32.Parse(Request.QueryString["applicationid"]);
     }
     if (Request.QueryString["pageid"] != null && Request.QueryString["pageid"] != "")
     {
         intPage = Int32.Parse(Request.QueryString["pageid"]);
     }
     if (Request.Cookies["application"] != null && Request.Cookies["application"].Value != "")
     {
         intApplication = Int32.Parse(Request.Cookies["application"].Value);
     }
     lblTitle.Text = oPage.Get(intPage, "title");
     if (Request.QueryString["save"] != null && Request.QueryString["save"] != "")
     {
         Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "saved", "<script type=\"text/javascript\">alert('Request Submitted Successfully');window.navigate('" + oPage.GetFullLink(intPage) + "?mid=" + Request.QueryString["mid"] + "');<" + "/" + "script>");
     }
     if (!IsPostBack)
     {
         LoadLists();
         lblRequestBy.Text = oUser.GetFullName(intProfile);
         lblRequestOn.Text = DateTime.Now.ToLongDateString();
         btnSubmit.Attributes.Add("onclick", "return ValidateRadioButtons('" + radSuggestion.ClientID + "','" + radIssue.ClientID + "','Please select the request type')" +
                                  " && ValidateText('" + txtDescription.ClientID + "','Please enter a description')" +
                                  ";");
         lblId.Text = "0";
         if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
         {
             DataSet ds = oSupport.Get(Int32.Parse(Request.QueryString["id"]));
             if (ds.Tables[0].Rows.Count > 0)
             {
                 int intUser = Int32.Parse(ds.Tables[0].Rows[0]["userid"].ToString());
                 if (intProfile == intUser)
                 {
                     lblId.Text              = Request.QueryString["id"];
                     panEdit.Visible         = true;
                     txtTitle.Text           = ds.Tables[0].Rows[0]["name"].ToString();
                     ddlModule.SelectedValue = ds.Tables[0].Rows[0]["pageid"].ToString();
                     if (ds.Tables[0].Rows[0]["type"].ToString() == "0")
                     {
                         radIssue.Checked = true;
                     }
                     else
                     {
                         radSuggestion.Checked = true;
                     }
                     txtDescription.Text  = ds.Tables[0].Rows[0]["description"].ToString();
                     lblRequestBy.Text    = oUser.GetFullName(intUser);
                     lblRequestOn.Text    = DateTime.Parse(ds.Tables[0].Rows[0]["modified"].ToString()).ToLongDateString();
                     panEditAdmin.Visible = true;
                     lblEditComments.Text = ds.Tables[0].Rows[0]["comments"].ToString();
                     if (lblEditComments.Text == "")
                     {
                         lblEditComments.Text = "<i>None</i>";
                     }
                     lblEditStatus.Text = ds.Tables[0].Rows[0]["statusname"].ToString();
                 }
                 else
                 {
                     panView.Visible = true;
                     lblName.Text    = ds.Tables[0].Rows[0]["name"].ToString();
                     lblModule.Text  = oPage.Get(Int32.Parse(ds.Tables[0].Rows[0]["pageid"].ToString()), "menutitle");
                     if (ds.Tables[0].Rows[0]["type"].ToString() == "0")
                     {
                         lblType.Text = "Issue";
                     }
                     else
                     {
                         lblType.Text = "Suggestion";
                     }
                     lblDescription.Text  = ds.Tables[0].Rows[0]["description"].ToString();
                     lblBy.Text           = oUser.GetFullName(intUser);
                     lblOn.Text           = DateTime.Parse(ds.Tables[0].Rows[0]["modified"].ToString()).ToLongDateString();
                     lblViewComments.Text = ds.Tables[0].Rows[0]["comments"].ToString();
                     if (lblViewComments.Text == "")
                     {
                         lblViewComments.Text = "<i>None</i>";
                     }
                     lblViewStatus.Text = ds.Tables[0].Rows[0]["statusname"].ToString();
                 }
             }
             else
             {
                 panEdit.Visible = true;
             }
         }
         else
         {
             panEdit.Visible = true;
         }
     }
 }
Ejemplo n.º 6
0
        protected internal virtual void DoRegisterTypes(ModelBuilder bpmnModelBuilder)
        {
            ActivationConditionImpl.RegisterType(bpmnModelBuilder);
            ActivityImpl.RegisterType(bpmnModelBuilder);
            ArtifactImpl.RegisterType(bpmnModelBuilder);
            AssignmentImpl.RegisterType(bpmnModelBuilder);
            AssociationImpl.RegisterType(bpmnModelBuilder);
            AuditingImpl.RegisterType(bpmnModelBuilder);
            BaseElementImpl.RegisterType(bpmnModelBuilder);
            BoundaryEventImpl.RegisterType(bpmnModelBuilder);
            BusinessRuleTaskImpl.RegisterType(bpmnModelBuilder);
            CallableElementImpl.RegisterType(bpmnModelBuilder);
            CallActivityImpl.RegisterType(bpmnModelBuilder);
            CallConversationImpl.RegisterType(bpmnModelBuilder);
            CancelEventDefinitionImpl.RegisterType(bpmnModelBuilder);
            CatchEventImpl.RegisterType(bpmnModelBuilder);
            CategoryValueImpl.RegisterType(bpmnModelBuilder);
            CategoryValueRef.RegisterType(bpmnModelBuilder);
            ChildLaneSet.RegisterType(bpmnModelBuilder);
            CollaborationImpl.RegisterType(bpmnModelBuilder);
            CompensateEventDefinitionImpl.RegisterType(bpmnModelBuilder);
            ConditionImpl.RegisterType(bpmnModelBuilder);
            ConditionalEventDefinitionImpl.RegisterType(bpmnModelBuilder);
            CompletionConditionImpl.RegisterType(bpmnModelBuilder);
            ComplexBehaviorDefinitionImpl.RegisterType(bpmnModelBuilder);
            ComplexGatewayImpl.RegisterType(bpmnModelBuilder);
            ConditionExpressionImpl.RegisterType(bpmnModelBuilder);
            ConversationAssociationImpl.RegisterType(bpmnModelBuilder);
            ConversationImpl.RegisterType(bpmnModelBuilder);
            ConversationLinkImpl.RegisterType(bpmnModelBuilder);
            ConversationNodeImpl.RegisterType(bpmnModelBuilder);
            CorrelationKeyImpl.RegisterType(bpmnModelBuilder);
            CorrelationPropertyBindingImpl.RegisterType(bpmnModelBuilder);
            CorrelationPropertyImpl.RegisterType(bpmnModelBuilder);
            CorrelationPropertyRef.RegisterType(bpmnModelBuilder);
            CorrelationPropertyRetrievalExpressionImpl.RegisterType(bpmnModelBuilder);
            CorrelationSubscriptionImpl.RegisterType(bpmnModelBuilder);
            DataAssociationImpl.RegisterType(bpmnModelBuilder);
            DataInputAssociationImpl.RegisterType(bpmnModelBuilder);
            DataInputImpl.RegisterType(bpmnModelBuilder);
            DataInputRefs.RegisterType(bpmnModelBuilder);
            DataOutputAssociationImpl.RegisterType(bpmnModelBuilder);
            DataOutputImpl.RegisterType(bpmnModelBuilder);
            DataOutputRefs.RegisterType(bpmnModelBuilder);
            DataPath.RegisterType(bpmnModelBuilder);
            DataStateImpl.RegisterType(bpmnModelBuilder);
            DataObjectImpl.RegisterType(bpmnModelBuilder);
            DataObjectReferenceImpl.RegisterType(bpmnModelBuilder);
            DataStoreImpl.RegisterType(bpmnModelBuilder);
            DefinitionsImpl.RegisterType(bpmnModelBuilder);
            DocumentationImpl.RegisterType(bpmnModelBuilder);
            EndEventImpl.RegisterType(bpmnModelBuilder);
            EndPointImpl.RegisterType(bpmnModelBuilder);
            EndPointRef.RegisterType(bpmnModelBuilder);
            ErrorEventDefinitionImpl.RegisterType(bpmnModelBuilder);
            ErrorImpl.RegisterType(bpmnModelBuilder);
            ErrorRef.RegisterType(bpmnModelBuilder);
            EscalationImpl.RegisterType(bpmnModelBuilder);
            EscalationEventDefinitionImpl.RegisterType(bpmnModelBuilder);
            EventBasedGatewayImpl.RegisterType(bpmnModelBuilder);
            EventDefinitionImpl.RegisterType(bpmnModelBuilder);
            EventDefinitionRef.RegisterType(bpmnModelBuilder);
            EventImpl.RegisterType(bpmnModelBuilder);
            ExclusiveGatewayImpl.RegisterType(bpmnModelBuilder);
            ExpressionImpl.RegisterType(bpmnModelBuilder);
            ExtensionElementsImpl.RegisterType(bpmnModelBuilder);
            ExtensionImpl.RegisterType(bpmnModelBuilder);
            FlowElementImpl.RegisterType(bpmnModelBuilder);
            FlowNodeImpl.RegisterType(bpmnModelBuilder);
            FlowNodeRef.RegisterType(bpmnModelBuilder);
            FormalExpressionImpl.RegisterType(bpmnModelBuilder);
            From.RegisterType(bpmnModelBuilder);
            GatewayImpl.RegisterType(bpmnModelBuilder);
            GlobalConversationImpl.RegisterType(bpmnModelBuilder);
            HumanPerformerImpl.RegisterType(bpmnModelBuilder);
            ImportImpl.RegisterType(bpmnModelBuilder);
            InclusiveGatewayImpl.RegisterType(bpmnModelBuilder);
            Incoming.RegisterType(bpmnModelBuilder);
            InMessageRef.RegisterType(bpmnModelBuilder);
            InnerParticipantRef.RegisterType(bpmnModelBuilder);
            InputDataItemImpl.RegisterType(bpmnModelBuilder);
            InputSetImpl.RegisterType(bpmnModelBuilder);
            InputSetRefs.RegisterType(bpmnModelBuilder);
            InteractionNodeImpl.RegisterType(bpmnModelBuilder);
            InterfaceImpl.RegisterType(bpmnModelBuilder);
            InterfaceRef.RegisterType(bpmnModelBuilder);
            IntermediateCatchEventImpl.RegisterType(bpmnModelBuilder);
            IntermediateThrowEventImpl.RegisterType(bpmnModelBuilder);
            IoBindingImpl.RegisterType(bpmnModelBuilder);
            IoSpecificationImpl.RegisterType(bpmnModelBuilder);
            ItemAwareElementImpl.RegisterType(bpmnModelBuilder);
            ItemDefinitionImpl.RegisterType(bpmnModelBuilder);
            LaneImpl.RegisterType(bpmnModelBuilder);
            LaneSetImpl.RegisterType(bpmnModelBuilder);
            LinkEventDefinitionImpl.RegisterType(bpmnModelBuilder);
            LoopCardinalityImpl.RegisterType(bpmnModelBuilder);
            LoopCharacteristicsImpl.RegisterType(bpmnModelBuilder);
            LoopDataInputRef.RegisterType(bpmnModelBuilder);
            LoopDataOutputRef.RegisterType(bpmnModelBuilder);
            ManualTaskImpl.RegisterType(bpmnModelBuilder);
            MessageEventDefinitionImpl.RegisterType(bpmnModelBuilder);
            MessageFlowAssociationImpl.RegisterType(bpmnModelBuilder);
            MessageFlowImpl.RegisterType(bpmnModelBuilder);
            MessageFlowRef.RegisterType(bpmnModelBuilder);
            MessageImpl.RegisterType(bpmnModelBuilder);
            MessagePath.RegisterType(bpmnModelBuilder);
            ModelElementInstanceImpl.RegisterType(bpmnModelBuilder);
            MonitoringImpl.RegisterType(bpmnModelBuilder);
            MultiInstanceLoopCharacteristicsImpl.RegisterType(bpmnModelBuilder);
            OperationImpl.RegisterType(bpmnModelBuilder);
            OperationRef.RegisterType(bpmnModelBuilder);
            OptionalInputRefs.RegisterType(bpmnModelBuilder);
            OptionalOutputRefs.RegisterType(bpmnModelBuilder);
            OuterParticipantRef.RegisterType(bpmnModelBuilder);
            OutMessageRef.RegisterType(bpmnModelBuilder);
            Outgoing.RegisterType(bpmnModelBuilder);
            OutputDataItemImpl.RegisterType(bpmnModelBuilder);
            OutputSetImpl.RegisterType(bpmnModelBuilder);
            OutputSetRefs.RegisterType(bpmnModelBuilder);
            ParallelGatewayImpl.RegisterType(bpmnModelBuilder);
            ParticipantAssociationImpl.RegisterType(bpmnModelBuilder);
            ParticipantImpl.RegisterType(bpmnModelBuilder);
            ParticipantMultiplicityImpl.RegisterType(bpmnModelBuilder);
            ParticipantRef.RegisterType(bpmnModelBuilder);
            PartitionElement.RegisterType(bpmnModelBuilder);
            PerformerImpl.RegisterType(bpmnModelBuilder);
            PotentialOwnerImpl.RegisterType(bpmnModelBuilder);
            ProcessImpl.RegisterType(bpmnModelBuilder);
            PropertyImpl.RegisterType(bpmnModelBuilder);
            ReceiveTaskImpl.RegisterType(bpmnModelBuilder);
            RelationshipImpl.RegisterType(bpmnModelBuilder);
            RenderingImpl.RegisterType(bpmnModelBuilder);
            ResourceAssignmentExpressionImpl.RegisterType(bpmnModelBuilder);
            ResourceImpl.RegisterType(bpmnModelBuilder);
            ResourceParameterBindingImpl.RegisterType(bpmnModelBuilder);
            ResourceParameterImpl.RegisterType(bpmnModelBuilder);
            ResourceRef.RegisterType(bpmnModelBuilder);
            ResourceRoleImpl.RegisterType(bpmnModelBuilder);
            RootElementImpl.RegisterType(bpmnModelBuilder);
            ScriptImpl.RegisterType(bpmnModelBuilder);
            ScriptTaskImpl.RegisterType(bpmnModelBuilder);
            SendTaskImpl.RegisterType(bpmnModelBuilder);
            SequenceFlowImpl.RegisterType(bpmnModelBuilder);
            ServiceTaskImpl.RegisterType(bpmnModelBuilder);
            SignalEventDefinitionImpl.RegisterType(bpmnModelBuilder);
            SignalImpl.RegisterType(bpmnModelBuilder);
            Source.RegisterType(bpmnModelBuilder);
            SourceRef.RegisterType(bpmnModelBuilder);
            StartEventImpl.RegisterType(bpmnModelBuilder);
            SubConversationImpl.RegisterType(bpmnModelBuilder);
            SubProcessImpl.RegisterType(bpmnModelBuilder);
            SupportedInterfaceRef.RegisterType(bpmnModelBuilder);
            Supports.RegisterType(bpmnModelBuilder);
            Target.RegisterType(bpmnModelBuilder);
            TargetRef.RegisterType(bpmnModelBuilder);
            TaskImpl.RegisterType(bpmnModelBuilder);
            TerminateEventDefinitionImpl.RegisterType(bpmnModelBuilder);
            TextImpl.RegisterType(bpmnModelBuilder);
            TextAnnotationImpl.RegisterType(bpmnModelBuilder);
            ThrowEventImpl.RegisterType(bpmnModelBuilder);
            TimeCycleImpl.RegisterType(bpmnModelBuilder);
            TimeDateImpl.RegisterType(bpmnModelBuilder);
            TimeDurationImpl.RegisterType(bpmnModelBuilder);
            TimerEventDefinitionImpl.RegisterType(bpmnModelBuilder);
            To.RegisterType(bpmnModelBuilder);
            TransactionImpl.RegisterType(bpmnModelBuilder);
            Transformation.RegisterType(bpmnModelBuilder);
            UserTaskImpl.RegisterType(bpmnModelBuilder);
            WhileExecutingInputRefs.RegisterType(bpmnModelBuilder);
            WhileExecutingOutputRefs.RegisterType(bpmnModelBuilder);

            // DC
            FontImpl.RegisterType(bpmnModelBuilder);
            PointImpl.RegisterType(bpmnModelBuilder);
            BoundsImpl.RegisterType(bpmnModelBuilder);

            // DI
            DiagramImpl.RegisterType(bpmnModelBuilder);
            DiagramElementImpl.RegisterType(bpmnModelBuilder);
            EdgeImpl.RegisterType(bpmnModelBuilder);
            impl.instance.di.ExtensionImpl.RegisterType(bpmnModelBuilder);
            LabelImpl.RegisterType(bpmnModelBuilder);
            LabeledEdgeImpl.RegisterType(bpmnModelBuilder);
            LabeledShapeImpl.RegisterType(bpmnModelBuilder);
            NodeImpl.RegisterType(bpmnModelBuilder);
            PlaneImpl.RegisterType(bpmnModelBuilder);
            ShapeImpl.RegisterType(bpmnModelBuilder);
            StyleImpl.RegisterType(bpmnModelBuilder);
            WaypointImpl.RegisterType(bpmnModelBuilder);

            // BPMNDI
            BpmnDiagramImpl.RegisterType(bpmnModelBuilder);
            BpmnEdgeImpl.RegisterType(bpmnModelBuilder);
            BpmnLabelImpl.RegisterType(bpmnModelBuilder);
            BpmnLabelStyleImpl.RegisterType(bpmnModelBuilder);
            BpmnPlaneImpl.RegisterType(bpmnModelBuilder);
            BpmnShapeImpl.RegisterType(bpmnModelBuilder);

            // camunda extensions
            CamundaConnectorImpl.RegisterType(bpmnModelBuilder);
            CamundaConnectorIdImpl.RegisterType(bpmnModelBuilder);
            CamundaConstraintImpl.RegisterType(bpmnModelBuilder);
            CamundaEntryImpl.RegisterType(bpmnModelBuilder);
            CamundaExecutionListenerImpl.RegisterType(bpmnModelBuilder);
            CamundaExpressionImpl.RegisterType(bpmnModelBuilder);
            CamundaFailedJobRetryTimeCycleImpl.RegisterType(bpmnModelBuilder);
            CamundaFieldImpl.RegisterType(bpmnModelBuilder);
            CamundaFormDataImpl.RegisterType(bpmnModelBuilder);
            CamundaFormFieldImpl.RegisterType(bpmnModelBuilder);
            CamundaFormPropertyImpl.RegisterType(bpmnModelBuilder);
            CamundaInImpl.RegisterType(bpmnModelBuilder);
            CamundaInputOutputImpl.RegisterType(bpmnModelBuilder);
            CamundaInputParameterImpl.RegisterType(bpmnModelBuilder);
            CamundaListImpl.RegisterType(bpmnModelBuilder);
            CamundaMapImpl.RegisterType(bpmnModelBuilder);
            CamundaOutputParameterImpl.RegisterType(bpmnModelBuilder);
            CamundaOutImpl.RegisterType(bpmnModelBuilder);
            CamundaPotentialStarterImpl.RegisterType(bpmnModelBuilder);
            CamundaPropertiesImpl.RegisterType(bpmnModelBuilder);
            CamundaPropertyImpl.RegisterType(bpmnModelBuilder);
            CamundaScriptImpl.RegisterType(bpmnModelBuilder);
            CamundaStringImpl.RegisterType(bpmnModelBuilder);
            CamundaTaskListenerImpl.RegisterType(bpmnModelBuilder);
            CamundaValidationImpl.RegisterType(bpmnModelBuilder);
            CamundaValueImpl.RegisterType(bpmnModelBuilder);
        }