コード例 #1
0
 void AWSFunction()
 {
     if (!dbClient.ListTablesAsync().Result.TableNames.Contains("iConnectTable"))
     {
         dbClient.CreateTableAsync(new CreateTableRequest
         {
             TableName             = "iConnectTable",
             ProvisionedThroughput = new ProvisionedThroughput {
                 ReadCapacityUnits = 10, WriteCapacityUnits = 10
             },
             KeySchema = new List <KeySchemaElement>
             {
                 new KeySchemaElement
                 {
                     AttributeName = "Name",
                     KeyType       = KeyType.HASH
                 }
             },
             AttributeDefinitions = new List <AttributeDefinition>
             {
                 new AttributeDefinition {
                     AttributeName = "Name", AttributeType = ScalarAttributeType.S
                 }
             }
         });
     }
     else
     {
         iConnectTable iConnectTableObject = new iConnectTable
         {
             Name      = "ShubhamGoel",
             Message   = "This is my messgae",
             Date      = new DateTime(2017, 9, 10),
             EventName = "bcghfghjk"
         };
         context.SaveAsync <iConnectTable>(iConnectTableObject);
     }
 }
コード例 #2
0
        public MainPage()
        {
            InitializeComponent();

            ngoList.ItemsSource = TotalLists.ngoNamesList;//ngoNamesList;
            //TypeFilterList();
            picker.ItemsSource = TotalLists.filteredList;
            filterImage.Source = ImageSource.FromResource("iConnect.Images.filter.png");
            searchImage.Source = ImageSource.FromResource("iConnect.Images.search.png");
            nearbyImage.Source = ImageSource.FromResource("iConnect.Images.nearby.png");

            nativeClass = DependencyService.Get <INativeClass>();

            List <iConnectTable> list = new List <iConnectTable>();
            iConnectTable        obj  = new iConnectTable();

            obj.Name      = "Shubham";
            obj.EventName = "Event Name";
            obj.Message   = "Jai Ma BhaderKali";
            obj.Date      = new DateTime(1992, 9, 10);
            list.Add(obj);

            liveFeedList.ItemsSource = list;
        }