示例#1
0
        static keybridge create_new_copy(fulltweets tweet)
        {
            var keybridgeItem = new keybridge
            {
                id     = tweet.id,
                year   = tweet.year,
                day    = tweet.day,
                month  = tweet.month,
                hour   = tweet.hour,
                minute = tweet.minute,

                bing_negative = tweet.bing_negative,
                bing_positive = tweet.bing_positive,

                D_Anger      = tweet.D_Anger,
                D_Caring     = tweet.D_Caring,
                D_Confusion  = tweet.D_Confusion,
                D_Depression = tweet.D_Depression,
                D_Fear       = tweet.D_Fear,

                D_Happiness      = tweet.D_Happiness,
                D_Hurt           = tweet.D_Hurt,
                D_Inadequateness = tweet.D_Inadequateness,
                D_Loneliness     = tweet.D_Loneliness,
                D_Remorse        = tweet.D_Remorse
            };

            return(keybridgeItem);
        }
示例#2
0
        static List <keybridge> process(fulltweets tweet)
        {
            var keybridge = new List <keybridge>();


            if (tweet.key1 != "")
            {
                var keybridgeNewItem = create_new_copy(tweet);
                keybridgeNewItem.key = tweet.key1;
                keybridge.Add(keybridgeNewItem);
            }
            if (tweet.key2 != "")
            {
                var keybridgeNewItem = create_new_copy(tweet);
                keybridgeNewItem.key = tweet.key2;
                keybridge.Add(keybridgeNewItem);
            }
            if (tweet.key3 != "")
            {
                var keybridgeNewItem = create_new_copy(tweet);
                keybridgeNewItem.key = tweet.key3;
                keybridge.Add(keybridgeNewItem);
            }
            if (tweet.key4 != "")
            {
                var keybridgeNewItem = create_new_copy(tweet);
                keybridgeNewItem.key = tweet.key4;
                keybridge.Add(keybridgeNewItem);
            }
            if (tweet.key5 != "")
            {
                var keybridgeNewItem = create_new_copy(tweet);
                keybridgeNewItem.key = tweet.key5;
                keybridge.Add(keybridgeNewItem);
            }
            if (tweet.key6 != "")
            {
                var keybridgeNewItem = create_new_copy(tweet);
                keybridgeNewItem.key = tweet.key6;
                keybridge.Add(keybridgeNewItem);
            }
            return(keybridge);
        }