Exemplo n.º 1
0
        public ResourceTypeList GetResourceTypes()
        {
            ResourceTypeList resTypeList = new ResourceTypeList();

            resTypeList = resTypeList.GetResourceType();
            return(resTypeList);
        }
Exemplo n.º 2
0
        public void AddResourceType(ResourceType resourceType)
        {
            ResourceTypeList resourceTypeList = ResourceTypeList.getInstance();
            MethodInfo       method           = resourceTypeList.GetType().GetMethod("addResource", BindingFlags.NonPublic | BindingFlags.Instance);

            method.Invoke(resourceTypeList, new object[] { resourceType });
        }
Exemplo n.º 3
0
            public AccessBuilder(params ResourceType[] resources)
            {
                var resourcesList = new ResourceTypeList();

                resourcesList.Resources.Add(resources);
                requestPayload.AccessBody = new TokenRequestPayload.Types.AccessBody
                {
                    ResourceTypeList = resourcesList
                };
            }
        public XmlDocument GetResourceTypes()
        {
            XmlDocument           doc           = new XmlDocument();
            HydroSecurityInternal hydroInternal = new HydroSecurityInternal();
            ResourceTypeList      resTypeList   = new ResourceTypeList();

            resTypeList = hydroInternal.GetResourceTypes();
            XmlSerializer ser = new XmlSerializer(resTypeList.GetType());

            System.Text.StringBuilder sb     = new System.Text.StringBuilder();
            System.IO.StringWriter    writer = new System.IO.StringWriter(sb);
            ser.Serialize(writer, resTypeList);
            doc.LoadXml(sb.ToString());
            return(doc);
        }
Exemplo n.º 5
0
        public void AddAndGetAccessTokenRequest()
        {
            IList <ResourceType> types = new List <ResourceType>();

            types.Add(ResourceType.Accounts);
            var resourcesList = new ResourceTypeList();

            resourcesList.Resources.Add(types);
            var storedPayload = new TokenRequestPayload
            {
                UserRefId   = Util.Nonce(),
                RefId       = Util.Nonce(),
                RedirectUrl = Util.Nonce(),
                To          = new TokenMember
                {
                    Id = member.MemberId()
                },
                Description   = Util.Nonce(),
                CallbackState = Util.Nonce(),
                AccessBody    = new TokenRequestPayload.Types.AccessBody
                {
                    Type             = { types },
                    ResourceTypeList = resourcesList,
                }
            };

            var storedOptions = new Tokenio.Proto.Common.TokenProtos.TokenRequestOptions
            {
                BankId           = "iron",
                ReceiptRequested = false
            };

            var requestId = member.StoreTokenRequestBlocking(storedPayload, storedOptions);

            Assert.NotEmpty(requestId);

            var retrievedRequest = tokenClient.RetrieveTokenRequestBlocking(requestId);

            Assert.Equal(storedPayload, retrievedRequest.GetTokenRequestPayload());
            Assert.Equal(storedOptions, retrievedRequest.GetTokenRequestOptions());
        }
Exemplo n.º 6
0
 public List <ResourceType> GetResourceTypes()
 {
     return(ResourceTypeList.get());
 }
Exemplo n.º 7
0
        /// <summary>
        /// Associate child controls
        /// </summary>
        private void AssociateChildControls()
        {
            Table containerTable = new Table();

            containerTable.Rows.Add(CreateMainTitleRow());

            TableRow  row  = new TableRow();
            TableCell cell = new TableCell();

            cell.HorizontalAlign = HorizontalAlign.Left;

            Table table = new Table();

            table.Rows.Add(CreateResourceTypeRow());

            table.Rows.Add(CreatePageSizeRow());

            cell.Controls.Add(table);
            row.Cells.Add(cell);
            containerTable.Rows.Add(row);

            containerTable.Rows.Add(CreateAllRadioButtonRow());
            containerTable.Rows.Add(CreateFilterRadioButtonRow());
            containerTable.Rows.Add(CreateFilterCriteriaGridRow());
            containerTable.Rows.Add(CreatePlaceHolderRow());
            containerTable.Rows.Add(CreateValidationSummaryRow());
            containerTable.Rows.Add(CreatePlaceHolderRow());
            containerTable.Rows.Add(CreateSubmitButtonRow());
            containerTable.Rows.Add(CreatePlaceHolderRow());

            row  = new TableRow();
            cell = new TableCell();
            cell.HorizontalAlign = HorizontalAlign.Left;

            // adding div to grid control
            HtmlGenericControl gridDiv = new HtmlGenericControl("div");

            gridDiv.Style.Add("height", "100%");
            gridDiv.Style.Add("overflow", "auto");
            if (this.Width != null)
            {
                gridDiv.Style.Add("width", this.Width.ToString((CultureInfo.InvariantCulture)));
            }

            table = new Table();
            table.Rows.Add(CreateResourceListViewRow());
            table.Width       = new Unit("100%", CultureInfo.InvariantCulture);
            table.CellPadding = 10;

            gridDiv.Controls.Add(table);

            cell.Controls.Add(gridDiv);
            row.Cells.Add(cell);
            containerTable.Rows.Add(row);

            containerTable.Width = new Unit("100%", CultureInfo.InvariantCulture);

            Panel containerPanel = new Panel();

            containerPanel.DefaultButton = SubmitButton.ID;
            containerPanel.Controls.Add(containerTable);

            this.Controls.Add(containerPanel);


            if (!this.DesignMode)
            {
                if (!this.Page.IsPostBack)
                {
                    ResourceTypeList.Focus();
                }
            }
        }