Ecoer Logo

@eskiesirius

25

The awesome programmer

steemit.com/@eskiesirius
VOTING POWER100.00%
DOWNVOTE POWER100.00%
RESOURCE CREDITS100.00%
REPUTATION PROGRESS0.00%
Net Worth
0.034USD
STEEM
0.000STEEM
SBD
0.000SBD
Effective Power
5.001SP
├── Own SP
0.632SP
└── Incoming Deleg
+4.369SP

Detailed Balance

STEEM
balance
0.000STEEM
market_balance
0.000STEEM
savings_balance
0.000STEEM
reward_steem_balance
0.000STEEM
STEEM POWER
Own SP
0.632SP
Delegated Out
0.000SP
Delegation In
4.369SP
Effective Power
5.001SP
Reward SP (pending)
0.000SP
SBD
sbd_balance
0.000SBD
sbd_conversions
0.000SBD
sbd_market_balance
0.000SBD
savings_sbd_balance
0.000SBD
reward_sbd_balance
0.000SBD
{
  "balance": "0.000 STEEM",
  "savings_balance": "0.000 STEEM",
  "reward_steem_balance": "0.000 STEEM",
  "vesting_shares": "1029.128533 VESTS",
  "delegated_vesting_shares": "0.000000 VESTS",
  "received_vesting_shares": "7114.531273 VESTS",
  "sbd_balance": "0.000 SBD",
  "savings_sbd_balance": "0.000 SBD",
  "reward_sbd_balance": "0.000 SBD",
  "conversions": []
}

Account Info

nameeskiesirius
id398997
rank1,424,652
reputation48213852
created2017-10-06T01:46:39
recovery_accountsteem
proxyNone
post_count2
comment_count0
lifetime_vote_count0
witnesses_voted_for0
last_post2017-10-16T15:36:57
last_root_post2017-10-16T15:36:57
last_vote_time2017-10-17T11:10:51
proxied_vsf_votes0, 0, 0, 0
can_vote1
voting_power0
delayed_votes0
balance0.000 STEEM
savings_balance0.000 STEEM
sbd_balance0.000 SBD
savings_sbd_balance0.000 SBD
vesting_shares1029.128533 VESTS
delegated_vesting_shares0.000000 VESTS
received_vesting_shares7114.531273 VESTS
reward_vesting_balance0.000000 VESTS
vesting_balance0.000 STEEM
vesting_withdraw_rate0.000000 VESTS
next_vesting_withdrawal1969-12-31T23:59:59
withdrawn0
to_withdraw0
withdraw_routes0
savings_withdraw_requests0
last_account_recovery1970-01-01T00:00:00
reset_accountnull
last_owner_update1970-01-01T00:00:00
last_account_update2017-10-06T02:52:30
minedNo
sbd_seconds0
sbd_last_interest_payment1970-01-01T00:00:00
savings_sbd_last_interest_payment1970-01-01T00:00:00
{
  "id": 398997,
  "name": "eskiesirius",
  "owner": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM8G7kjdQv5sBXnrw9DGEaeNf567JnXn2vuVPaKFBrea4bgQb5tu",
        1
      ]
    ]
  },
  "active": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM6XE9FXJ8bQuVhxX6Efb4h5yzP1VxZpnCkdvDfcZvEsvfoZVw1Z",
        1
      ]
    ]
  },
  "posting": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM7Paag3Ne4pxkFrM9FawLFGJiT7GVxr3RyKRFsZR1buKFdaoUQ3",
        1
      ]
    ]
  },
  "memo_key": "STM63LKnX7uVAB7c4cRTi7eTz6SxXmiDMN1RFgzmsmz78GWFnxmdB",
  "json_metadata": "{\"profile\":{\"name\":\"Eskie Maquilang\",\"location\":\"Mandaue City\",\"website\":\"http://www.cebuhotellists.com\",\"about\":\"The awesome programmer\",\"profile_image\":\"https://scontent.fmnl4-4.fna.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/252225_10153618150333329_6290430562094952122_n.jpg?efg=eyJpIjoidCJ9&_nc_eui2=v1%3AAeGoRpL7Q4NuATWGgtABadIDA4_-j1r3h9GkruJVqc6c0EvBbTGteQabxQlqkM0jmUaAh1lz_dWNd89vC6rMmeL9wSMpwyK6TXjwhgNHpWoB9Q&oh=df94e3e82138f9079c2e61245ccb59e6&oe=5A460350\"}}",
  "posting_json_metadata": "{\"profile\":{\"name\":\"Eskie Maquilang\",\"location\":\"Mandaue City\",\"website\":\"http://www.cebuhotellists.com\",\"about\":\"The awesome programmer\",\"profile_image\":\"https://scontent.fmnl4-4.fna.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/252225_10153618150333329_6290430562094952122_n.jpg?efg=eyJpIjoidCJ9&_nc_eui2=v1%3AAeGoRpL7Q4NuATWGgtABadIDA4_-j1r3h9GkruJVqc6c0EvBbTGteQabxQlqkM0jmUaAh1lz_dWNd89vC6rMmeL9wSMpwyK6TXjwhgNHpWoB9Q&oh=df94e3e82138f9079c2e61245ccb59e6&oe=5A460350\"}}",
  "proxy": "",
  "last_owner_update": "1970-01-01T00:00:00",
  "last_account_update": "2017-10-06T02:52:30",
  "created": "2017-10-06T01:46:39",
  "mined": false,
  "recovery_account": "steem",
  "last_account_recovery": "1970-01-01T00:00:00",
  "reset_account": "null",
  "comment_count": 0,
  "lifetime_vote_count": 0,
  "post_count": 2,
  "can_vote": true,
  "voting_manabar": {
    "current_mana": "8143659806",
    "last_update_time": 1779062661
  },
  "downvote_manabar": {
    "current_mana": 2035914951,
    "last_update_time": 1779062661
  },
  "voting_power": 0,
  "balance": "0.000 STEEM",
  "savings_balance": "0.000 STEEM",
  "sbd_balance": "0.000 SBD",
  "sbd_seconds": "0",
  "sbd_seconds_last_update": "1970-01-01T00:00:00",
  "sbd_last_interest_payment": "1970-01-01T00:00:00",
  "savings_sbd_balance": "0.000 SBD",
  "savings_sbd_seconds": "0",
  "savings_sbd_seconds_last_update": "1970-01-01T00:00:00",
  "savings_sbd_last_interest_payment": "1970-01-01T00:00:00",
  "savings_withdraw_requests": 0,
  "reward_sbd_balance": "0.000 SBD",
  "reward_steem_balance": "0.000 STEEM",
  "reward_vesting_balance": "0.000000 VESTS",
  "reward_vesting_steem": "0.000 STEEM",
  "vesting_shares": "1029.128533 VESTS",
  "delegated_vesting_shares": "0.000000 VESTS",
  "received_vesting_shares": "7114.531273 VESTS",
  "vesting_withdraw_rate": "0.000000 VESTS",
  "next_vesting_withdrawal": "1969-12-31T23:59:59",
  "withdrawn": 0,
  "to_withdraw": 0,
  "withdraw_routes": 0,
  "curation_rewards": 0,
  "posting_rewards": 0,
  "proxied_vsf_votes": [
    0,
    0,
    0,
    0
  ],
  "witnesses_voted_for": 0,
  "last_post": "2017-10-16T15:36:57",
  "last_root_post": "2017-10-16T15:36:57",
  "last_vote_time": "2017-10-17T11:10:51",
  "post_bandwidth": 0,
  "pending_claimed_accounts": 0,
  "vesting_balance": "0.000 STEEM",
  "reputation": 48213852,
  "transfer_history": [],
  "market_history": [],
  "post_history": [],
  "vote_history": [],
  "other_history": [],
  "witness_votes": [],
  "tags_usage": [],
  "guest_bloggers": [],
  "rank": 1424652
}

Withdraw Routes

IncomingOutgoing
Empty
Empty
{
  "incoming": [],
  "outgoing": []
}
From Date
To Date
steemdelegated 4.369 SP to @eskiesirius
2026/05/18 00:04:21
delegatorsteem
delegateeeskiesirius
vesting shares7114.531273 VESTS
Transaction InfoBlock #106143233/Trx 936ad9d42af4ac97660122e1c9dfd9b98c04b3bc
View Raw JSON Data
{
  "trx_id": "936ad9d42af4ac97660122e1c9dfd9b98c04b3bc",
  "block": 106143233,
  "trx_in_block": 1,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2026-05-18T00:04:21",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "7114.531273 VESTS"
    }
  ]
}
steemdelegated 2.704 SP to @eskiesirius
2026/05/12 03:06:06
delegatorsteem
delegateeeskiesirius
vesting shares4402.320868 VESTS
Transaction InfoBlock #105974824/Trx 3b3c07ad025a7d64d8e834ebd9defdbc193e8c0c
View Raw JSON Data
{
  "trx_id": "3b3c07ad025a7d64d8e834ebd9defdbc193e8c0c",
  "block": 105974824,
  "trx_in_block": 4,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2026-05-12T03:06:06",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "4402.320868 VESTS"
    }
  ]
}
steemdelegated 4.377 SP to @eskiesirius
2026/04/25 23:25:33
delegatorsteem
delegateeeskiesirius
vesting shares7127.047029 VESTS
Transaction InfoBlock #105510889/Trx afacb3b9261bbffc8d31afe48c1b4d4495636001
View Raw JSON Data
{
  "trx_id": "afacb3b9261bbffc8d31afe48c1b4d4495636001",
  "block": 105510889,
  "trx_in_block": 6,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2026-04-25T23:25:33",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "7127.047029 VESTS"
    }
  ]
}
steemdelegated 2.729 SP to @eskiesirius
2026/01/23 07:18:30
delegatorsteem
delegateeeskiesirius
vesting shares4443.867687 VESTS
Transaction InfoBlock #102851217/Trx 494092624591d21a9891ce8e9a6ce267c940eb03
View Raw JSON Data
{
  "trx_id": "494092624591d21a9891ce8e9a6ce267c940eb03",
  "block": 102851217,
  "trx_in_block": 1,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2026-01-23T07:18:30",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "4443.867687 VESTS"
    }
  ]
}
steemdelegated 2.830 SP to @eskiesirius
2024/12/17 02:38:09
delegatorsteem
delegateeeskiesirius
vesting shares4608.086884 VESTS
Transaction InfoBlock #91297639/Trx 01c464ce9c12c48fb7c3a73d7c25bdc6683792e1
View Raw JSON Data
{
  "trx_id": "01c464ce9c12c48fb7c3a73d7c25bdc6683792e1",
  "block": 91297639,
  "trx_in_block": 2,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2024-12-17T02:38:09",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "4608.086884 VESTS"
    }
  ]
}
steemdelegated 2.934 SP to @eskiesirius
2023/11/13 18:20:54
delegatorsteem
delegateeeskiesirius
vesting shares4777.220416 VESTS
Transaction InfoBlock #79851840/Trx 03ad121402fb2cd46ff425162eba72a943149152
View Raw JSON Data
{
  "trx_id": "03ad121402fb2cd46ff425162eba72a943149152",
  "block": 79851840,
  "trx_in_block": 4,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2023-11-13T18:20:54",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "4777.220416 VESTS"
    }
  ]
}
steemdelegated 4.738 SP to @eskiesirius
2023/09/21 21:36:48
delegatorsteem
delegateeeskiesirius
vesting shares7714.499202 VESTS
Transaction InfoBlock #78347567/Trx 3e945e187ad1cc5ad63cb71fa325b9117493a099
View Raw JSON Data
{
  "trx_id": "3e945e187ad1cc5ad63cb71fa325b9117493a099",
  "block": 78347567,
  "trx_in_block": 1,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2023-09-21T21:36:48",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "7714.499202 VESTS"
    }
  ]
}
steemdelegated 4.874 SP to @eskiesirius
2022/11/03 11:26:30
delegatorsteem
delegateeeskiesirius
vesting shares7936.180640 VESTS
Transaction InfoBlock #69112949/Trx 4d3ed858a6795d2aca1c409a80f1391b5f953ccb
View Raw JSON Data
{
  "trx_id": "4d3ed858a6795d2aca1c409a80f1391b5f953ccb",
  "block": 69112949,
  "trx_in_block": 0,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2022-11-03T11:26:30",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "7936.180640 VESTS"
    }
  ]
}
steemdelegated 5.009 SP to @eskiesirius
2022/01/17 10:43:39
delegatorsteem
delegateeeskiesirius
vesting shares8156.713871 VESTS
Transaction InfoBlock #60809139/Trx dd19bac6a0117a4381fbb6de02be9d6b0089930e
View Raw JSON Data
{
  "trx_id": "dd19bac6a0117a4381fbb6de02be9d6b0089930e",
  "block": 60809139,
  "trx_in_block": 8,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2022-01-17T10:43:39",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "8156.713871 VESTS"
    }
  ]
}
steemdelegated 5.122 SP to @eskiesirius
2021/06/14 00:39:30
delegatorsteem
delegateeeskiesirius
vesting shares8340.482529 VESTS
Transaction InfoBlock #54607539/Trx 757b356661f37905fd001d6fc9e110d6f365e9a8
View Raw JSON Data
{
  "trx_id": "757b356661f37905fd001d6fc9e110d6f365e9a8",
  "block": 54607539,
  "trx_in_block": 5,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2021-06-14T00:39:30",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "8340.482529 VESTS"
    }
  ]
}
steemdelegated 5.237 SP to @eskiesirius
2020/12/11 10:58:36
delegatorsteem
delegateeeskiesirius
vesting shares8527.904503 VESTS
Transaction InfoBlock #49355005/Trx 5b5a5cd902131746f58e03b5d01d0672b1e4d7ce
View Raw JSON Data
{
  "trx_id": "5b5a5cd902131746f58e03b5d01d0672b1e4d7ce",
  "block": 49355005,
  "trx_in_block": 1,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-12-11T10:58:36",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "8527.904503 VESTS"
    }
  ]
}
steemdelegated 1.175 SP to @eskiesirius
2020/12/06 04:35:48
delegatorsteem
delegateeeskiesirius
vesting shares1912.543513 VESTS
Transaction InfoBlock #49206568/Trx 75f52907edcce931b9fe194946b4cda0b6f7ab46
View Raw JSON Data
{
  "trx_id": "75f52907edcce931b9fe194946b4cda0b6f7ab46",
  "block": 49206568,
  "trx_in_block": 3,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-12-06T04:35:48",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "1912.543513 VESTS"
    }
  ]
}
steemdelegated 5.241 SP to @eskiesirius
2020/12/05 14:36:48
delegatorsteem
delegateeeskiesirius
vesting shares8534.112357 VESTS
Transaction InfoBlock #49190104/Trx f8a6feb0bc1666fde67f567da87751a9d53945ae
View Raw JSON Data
{
  "trx_id": "f8a6feb0bc1666fde67f567da87751a9d53945ae",
  "block": 49190104,
  "trx_in_block": 0,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-12-05T14:36:48",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "8534.112357 VESTS"
    }
  ]
}
steemdelegated 1.179 SP to @eskiesirius
2020/11/02 15:15:18
delegatorsteem
delegateeeskiesirius
vesting shares1920.017158 VESTS
Transaction InfoBlock #48257348/Trx ae5eb41b3612b5ee66f9f5f3f1d57674a322b261
View Raw JSON Data
{
  "trx_id": "ae5eb41b3612b5ee66f9f5f3f1d57674a322b261",
  "block": 48257348,
  "trx_in_block": 2,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-11-02T15:15:18",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "1920.017158 VESTS"
    }
  ]
}
steemdelegated 5.365 SP to @eskiesirius
2020/05/09 05:32:54
delegatorsteem
delegateeeskiesirius
vesting shares8736.917716 VESTS
Transaction InfoBlock #43216811/Trx 25f6b583282046adb05bae5fd6c5cbb82f1c651f
View Raw JSON Data
{
  "trx_id": "25f6b583282046adb05bae5fd6c5cbb82f1c651f",
  "block": 43216811,
  "trx_in_block": 17,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-05-09T05:32:54",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "8736.917716 VESTS"
    }
  ]
}
steemdelegated 1.200 SP to @eskiesirius
2020/05/08 09:07:33
delegatorsteem
delegateeeskiesirius
vesting shares1953.311140 VESTS
Transaction InfoBlock #43192882/Trx cc148003e447a8393df88f0205a4355ae2e2e163
View Raw JSON Data
{
  "trx_id": "cc148003e447a8393df88f0205a4355ae2e2e163",
  "block": 43192882,
  "trx_in_block": 6,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-05-08T09:07:33",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "1953.311140 VESTS"
    }
  ]
}
steemdelegated 5.373 SP to @eskiesirius
2020/04/15 21:30:06
delegatorsteem
delegateeeskiesirius
vesting shares8749.895135 VESTS
Transaction InfoBlock #42562428/Trx 7ec32694687f0078af33385a41df757f4910748b
View Raw JSON Data
{
  "trx_id": "7ec32694687f0078af33385a41df757f4910748b",
  "block": 42562428,
  "trx_in_block": 19,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-04-15T21:30:06",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "8749.895135 VESTS"
    }
  ]
}
2019/10/06 02:30:42
parent authoreskiesirius
parent permlinkmethod-chaining-in-c
authorsteemitboard
permlinksteemitboard-notify-eskiesirius-20191006t023041000z
title
bodyCongratulations @eskiesirius! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@eskiesirius/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table> <sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@eskiesirius) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=eskiesirius)_</sub> ###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
json metadata{"image":["https://steemitboard.com/img/notify.png"]}
Transaction InfoBlock #37034513/Trx cd68ac41d8c012692e12e7e5184aae285af81852
View Raw JSON Data
{
  "trx_id": "cd68ac41d8c012692e12e7e5184aae285af81852",
  "block": 37034513,
  "trx_in_block": 16,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2019-10-06T02:30:42",
  "op": [
    "comment",
    {
      "parent_author": "eskiesirius",
      "parent_permlink": "method-chaining-in-c",
      "author": "steemitboard",
      "permlink": "steemitboard-notify-eskiesirius-20191006t023041000z",
      "title": "",
      "body": "Congratulations @eskiesirius! You received a personal award!\n\n<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@eskiesirius/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table>\n\n<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@eskiesirius) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=eskiesirius)_</sub>\n\n\n###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!",
      "json_metadata": "{\"image\":[\"https://steemitboard.com/img/notify.png\"]}"
    }
  ]
}
steemdelegated 5.494 SP to @eskiesirius
2019/05/12 14:45:03
delegatorsteem
delegateeeskiesirius
vesting shares8945.517940 VESTS
Transaction InfoBlock #32845304/Trx ed397c17e10d56c8d3632653b521487aeb451657
View Raw JSON Data
{
  "trx_id": "ed397c17e10d56c8d3632653b521487aeb451657",
  "block": 32845304,
  "trx_in_block": 13,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2019-05-12T14:45:03",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "8945.517940 VESTS"
    }
  ]
}
2018/10/06 03:32:06
parent authoreskiesirius
parent permlinkmethod-chaining-in-c
authorsteemitboard
permlinksteemitboard-notify-eskiesirius-20181006t033205000z
title
bodyCongratulations @eskiesirius! You have received a personal award! [![](https://steemitimages.com/70x70/http://steemitboard.com/@eskiesirius/birthday1.png)](http://steemitboard.com/@eskiesirius) 1 Year on Steemit <sub>_Click on the badge to view your Board of Honor._</sub> **Do not miss the last post from @steemitboard:** <table><tr><td><a href="https://steemit.com/steemitboard/@steemitboard/introducing-steemitboard-ranking"><img src="https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmfRVpHQhLDhnjDtqck8GPv9NPvNKPfMsDaAFDE1D9Er2Z/header_ranking.png"></a></td><td><a href="https://steemit.com/steemitboard/@steemitboard/introducing-steemitboard-ranking">Introducing SteemitBoard Ranking</a></td></tr></table> > Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
json metadata{"image":["https://steemitboard.com/img/notify.png"]}
Transaction InfoBlock #26559410/Trx 203dfd67f4dfc638deb3d97b9e8a5e5779c6e6c8
View Raw JSON Data
{
  "trx_id": "203dfd67f4dfc638deb3d97b9e8a5e5779c6e6c8",
  "block": 26559410,
  "trx_in_block": 1,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-10-06T03:32:06",
  "op": [
    "comment",
    {
      "parent_author": "eskiesirius",
      "parent_permlink": "method-chaining-in-c",
      "author": "steemitboard",
      "permlink": "steemitboard-notify-eskiesirius-20181006t033205000z",
      "title": "",
      "body": "Congratulations @eskiesirius! You have received a personal award!\n\n[![](https://steemitimages.com/70x70/http://steemitboard.com/@eskiesirius/birthday1.png)](http://steemitboard.com/@eskiesirius)  1 Year on Steemit\n<sub>_Click on the badge to view your Board of Honor._</sub>\n\n\n**Do not miss the last post from @steemitboard:**\n<table><tr><td><a href=\"https://steemit.com/steemitboard/@steemitboard/introducing-steemitboard-ranking\"><img src=\"https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmfRVpHQhLDhnjDtqck8GPv9NPvNKPfMsDaAFDE1D9Er2Z/header_ranking.png\"></a></td><td><a href=\"https://steemit.com/steemitboard/@steemitboard/introducing-steemitboard-ranking\">Introducing SteemitBoard Ranking</a></td></tr></table>\n\n> Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!",
      "json_metadata": "{\"image\":[\"https://steemitboard.com/img/notify.png\"]}"
    }
  ]
}
2018/08/28 17:24:03
parent authoreskiesirius
parent permlinkmethod-chaining-in-c
authoribrahim-ym
permlinkre-eskiesirius-method-chaining-in-c-20180828t172359333z
title
bodyHello Eskiesrius; Your Dog class is not a singleton as long as the constructor is publicly available then the class is not a singleton.
json metadata{"tags":["programming"],"app":"steemit/0.1"}
Transaction InfoBlock #25469228/Trx da9cf57975a4a906d99c1dd962cfb3120f848906
View Raw JSON Data
{
  "trx_id": "da9cf57975a4a906d99c1dd962cfb3120f848906",
  "block": 25469228,
  "trx_in_block": 12,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-28T17:24:03",
  "op": [
    "comment",
    {
      "parent_author": "eskiesirius",
      "parent_permlink": "method-chaining-in-c",
      "author": "ibrahim-ym",
      "permlink": "re-eskiesirius-method-chaining-in-c-20180828t172359333z",
      "title": "",
      "body": "Hello Eskiesrius; Your Dog class is not a singleton as long as the constructor is publicly available then the class is not a singleton.",
      "json_metadata": "{\"tags\":[\"programming\"],\"app\":\"steemit/0.1\"}"
    }
  ]
}
steemdelegated 5.616 SP to @eskiesirius
2018/05/16 20:16:24
delegatorsteem
delegateeeskiesirius
vesting shares9145.070375 VESTS
Transaction InfoBlock #22489829/Trx bee607437710e8a2c842438df63583a9c44a8ac3
View Raw JSON Data
{
  "trx_id": "bee607437710e8a2c842438df63583a9c44a8ac3",
  "block": 22489829,
  "trx_in_block": 2,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-05-16T20:16:24",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "9145.070375 VESTS"
    }
  ]
}
steemdelegated 18.195 SP to @eskiesirius
2018/02/21 23:06:48
delegatorsteem
delegateeeskiesirius
vesting shares29627.888049 VESTS
Transaction InfoBlock #20076566/Trx bd05a4585bc5074ca376685f1b735e522d746cf0
View Raw JSON Data
{
  "trx_id": "bd05a4585bc5074ca376685f1b735e522d746cf0",
  "block": 20076566,
  "trx_in_block": 8,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-02-21T23:06:48",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "29627.888049 VESTS"
    }
  ]
}
2017/10/22 08:23:36
votermrcoolguy
authoreskiesirius
permlinkmethod-chaining-in-c
weight10000 (100.00%)
Transaction InfoBlock #16547760/Trx 4ad5f80f2d6f3ef54b8c7bdf1df2142057ae04e8
View Raw JSON Data
{
  "trx_id": "4ad5f80f2d6f3ef54b8c7bdf1df2142057ae04e8",
  "block": 16547760,
  "trx_in_block": 3,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-22T08:23:36",
  "op": [
    "vote",
    {
      "voter": "mrcoolguy",
      "author": "eskiesirius",
      "permlink": "method-chaining-in-c",
      "weight": 10000
    }
  ]
}
2017/10/19 05:10:12
voterdavegala09
authoreskiesirius
permlinkmethod-chaining-in-c
weight10000 (100.00%)
Transaction InfoBlock #16457544/Trx 0373ed63d43e4ce732ae3923a3dc95bff844a154
View Raw JSON Data
{
  "trx_id": "0373ed63d43e4ce732ae3923a3dc95bff844a154",
  "block": 16457544,
  "trx_in_block": 7,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-19T05:10:12",
  "op": [
    "vote",
    {
      "voter": "davegala09",
      "author": "eskiesirius",
      "permlink": "method-chaining-in-c",
      "weight": 10000
    }
  ]
}
2017/10/17 11:10:51
votereskiesirius
authoreskiesirius
permlinkmethod-chaining-in-c
weight10000 (100.00%)
Transaction InfoBlock #16407171/Trx afda6b611a58646ab491d05b6a6d45c99235c9ad
View Raw JSON Data
{
  "trx_id": "afda6b611a58646ab491d05b6a6d45c99235c9ad",
  "block": 16407171,
  "trx_in_block": 22,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-17T11:10:51",
  "op": [
    "vote",
    {
      "voter": "eskiesirius",
      "author": "eskiesirius",
      "permlink": "method-chaining-in-c",
      "weight": 10000
    }
  ]
}
eskiesiriuspublished a new post: method-chaining-in-c
2017/10/16 15:40:57
parent author
parent permlinkprogramming
authoreskiesirius
permlinkmethod-chaining-in-c
titleMethod Chaining in C#, why bother using it?
body<html> <p>&nbsp;</p> <h1>How to apply Method Chaining in&nbsp;C#</h1> <p>Method chaining is a type of implementation pattern that we could reuse/recall a method a couple of times within a single object instantiation without limits. In <a href="https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMethod_chaining">wikipedia</a>, it’s referred to as:&nbsp;</p> <blockquote><em>Also known as named parameter idiom, is a common</em> <a href="https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSyntax_%28programming_languages%29"><em>syntax</em></a> <em>for invoking multiple method calls in</em> <a href="https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FObject-oriented_programming"><em>object-oriented programming languages</em></a><em>. Each method returns an object, allowing the calls to be chained together in a single statement without requiring variables to store the intermediate results.</em></blockquote> <p>If used properly, we can create a more efficient pattern which improves code readability in the long run. Another term for this implementation is called <em><strong>Fluent Interface</strong></em> which acts as if you were building a sentence.I first noticed this pattern when I was using jquery than I was using C#, so I got intrigued and curious whether the pattern was even applicable in the first place in my main programming language.&nbsp;Later on I discovered in some of my advanced projects where we use methodologies such as <em><strong>Unit Tests</strong></em> and doing some fluent mapping in <em><strong>NHibernate</strong></em>, Method Chaining becomes noticeable later on.</p> <h3>Okay, so why do we need to use method chaining&nbsp;exactly?</h3> <p>There are a couple of reasons why you might want to implement method chaining into your project or library you were working on. One of the few reason for this is its <em><strong>readability purposes</strong></em>. Ever since at the start we love to simplify our code through a lot of patterns. And from that idea alone, we now have dozens of frameworks and patterns thanks to our laziness and thinking that loves innovation.Here are other few reasons why we need to use method chaining:</p> <ul> <li>Allows you to create Domain Specific Languages (DSL)</li> <li>Improves reusability</li> <li>Direct</li> <li>Expressive</li> </ul> <h3>Getting Started</h3> <p>In this sample, we’re going to use C# as our programming language for implementing method chaining. Just simply create new project and select console app for this demonstration.Now let’s get started!</p> <h3>Starting out — the singleton pattern</h3> <p>To apply method chaining more efficient and cleaner, we must know the use of pattern known as the <em><strong>“Singleton Pattern”</strong></em>. Now what is a singleton pattern?I’m sure you’ve heard a lot from developers about the term <em><strong>“Singleton”</strong></em>Pattern that they were using from time to time.If you’re not aware of it, <a href="https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSingleton_pattern">Singleton Pattern</a> is one of the Design Patterns where it restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system.In a more simplified terms, a Singleton Pattern limits your object to only <em><strong>one instantiation</strong></em>. This is because every time we instantiate an object, it’s considered another object that was created behind the scenes even though we’re instantiating the same class. Singleton Pattern prevents that from happening.Let’s take a look at this example:</p> <pre><code>public class MySingleton {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private static MySingleton _instance = null;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static MySingleton CreateInstance() {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (_instance == null) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new MySingleton();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> }</code></pre> <p>In this example, we have the class called MySingleton and a method of CreateInstance. The purpose of this method is to leave the instantiation to it, effectively instantiating the object once only.Once <em><strong>_instance</strong></em> variable was instantiated with an object, we can no longer instantiate it again because it’s not null anymore. So when we use <em><strong>CreateInstance()</strong></em> to create an instantiation in both variables that we will use, it will still use the same instance that was created by the method, effectively referencing both variables with the same object instance.</p> <h4>Now why do I need this&nbsp;anyway?</h4> <p>This is done mainly to preserve and lock the values of the properties of that instance. When we do not implement singleton pattern, the values of your properties and fields would be swiped clean and can never be reused again as you’re effectively using another object as an instance.It’s worthy to take note that Method Chaining relies on fields or properties that you’re going to reuse behind the scenes in order to make it possible to produce an output using Chaining.</p> <h3>Setting up the method chain — proper class structure</h3> <p>Now let’s proceed with the main topic, setting up our method chain.Without further ado, I’ll show you some sample structure of method chaining. Let’s use the <strong>Dog</strong> class as a simple sample for our demonstration:</p> <pre><code>public class Dog {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private static Dog _instance;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Dog() {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new Dog();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static Dog Instance() {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (_instance == null) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new Dog();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Dog Bark() {<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine("The dog barks!");<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Dog Eat() {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine("The dog eats!");<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> <br> &nbsp;&nbsp;&nbsp;}</code></pre> <p>And execute this class in our <strong>program.cs</strong>:</p> <pre><code>static void Main(string[] args) {<br> <br> &nbsp;&nbsp;&nbsp;Dog.Instance()<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Bark()<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Bark()<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Bark()<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Eat(); //the dog barks 3 times and eats his food!!<br> <br> }</code></pre> <p>And the corresponding output in console is:</p> <p><img src="https://cdn-images-1.medium.com/max/1600/1*6sMeMVMK9S1RNLDbsTLlWw.png" width="1600" height="875"/></p> <p>Touche isn’t it?This is how you usually structure your method chain. One thing you’ll notice here is we let the <em><strong>Instance()</strong></em> static method do the instantiation for us. Although you could also do the instantiation on your own like so:</p> <pre><code>var mydog = new Dog();<br> mydog<br> &nbsp;&nbsp;&nbsp;.Bark()<br> &nbsp;&nbsp;&nbsp;.Bark()<br> &nbsp;&nbsp;&nbsp;.Eat();</code></pre> <p>I personally believe it’s more verbose and more understandable when you let the method do the instantiation to increase its readability. The choice depends on you.But I would like your attention to focus on the remaining two methods I haven’t explained: <em><strong>Bark()</strong></em> and <em><strong>Eat()</strong></em>This is the pattern that invokes method chaining. So both <em><strong>Bark()</strong></em> and <em><strong>Eat()</strong></em>methods were returning the instance where they were sitting. Now with that setup, you can chain them for whatever you like endlessly without limits!</p> <h3>A more practical sample — Creating a&nbsp;library</h3> <p>Now that we already know how to setup our method chain, let’s move on to more practical sample we could do to harness C#’s capabilities.We’re going to create our own <em><strong>Unit Test</strong></em> library. <em><strong>Unit Testing</strong></em> by definition is is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. Unit testing can be done manually but is often automated.So for our own Unit Test library, let’s consider this one as a starting point.Name it <em><strong>Assertion</strong></em>:</p> <pre><code>public class Assertion {<br> <br> &nbsp;&nbsp;&nbsp;private static Assertion _instance;<br> &nbsp;&nbsp;&nbsp;private static int mygiven;<br> &nbsp;&nbsp;&nbsp;public static Assertion Given(int given) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (_instance == null) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new Assertion();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mygiven = given;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br> &nbsp;&nbsp;&nbsp;}<br> <br> &nbsp;&nbsp;&nbsp;public Assertion AreEqual(int equal) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (mygiven == equal) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine("They're equal!");<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine("Not equal!");<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br> &nbsp;&nbsp;&nbsp;}<br> }</code></pre> <p>Now let’s use the library to test the results:</p> <pre><code>var given = 5 + 5;<br> Assertion.Given(given)<br> &nbsp;&nbsp;&nbsp;.AreEqual(10)<br> &nbsp;&nbsp;&nbsp;.AreEqual(5);</code></pre> <p>And our output in console is:</p> <p><img src="https://cdn-images-1.medium.com/max/1600/1*Y52lY2ecPfU5n6rE8ojQvg.png" width="1600" height="875"/></p> <p>In the code, we’ve created our own Unit Test library and check whether the given value passes in our expected output which is provided in <em><strong>AreEqual()</strong></em>method.Through <em><strong>Method Chaining</strong></em>, our library is more fluent, understandable, and easier to read. You can also implement the Assertion library without using fluent interface or method chaining. But personally it’s more readable and understandable to use for consumers of your library if you’re gonna implement it fluently. Non-programmers can also benefit from using it since it’s easy to tell how to use it.</p> <h3>Wrapping everything up</h3> <p>I hope you enjoyed learning this lesson. This pattern can also be applied in other programming languages such as <em><strong>javascript</strong></em> since it’s where I first saw the pattern of method chaining.&nbsp;</p> </html>
json metadata{"tags":["programming","tips","oop","chaining","csharp"],"image":["https://cdn-images-1.medium.com/max/1600/1*6sMeMVMK9S1RNLDbsTLlWw.png","https://cdn-images-1.medium.com/max/1600/1*Y52lY2ecPfU5n6rE8ojQvg.png"],"links":["https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMethod_chaining","https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSyntax_%28programming_languages%29","https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FObject-oriented_programming","https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSingleton_pattern"],"app":"steemit/0.1","format":"html"}
Transaction InfoBlock #16383776/Trx 7884e8fa9fca445f48888362a9c575d2a6e1fc72
View Raw JSON Data
{
  "trx_id": "7884e8fa9fca445f48888362a9c575d2a6e1fc72",
  "block": 16383776,
  "trx_in_block": 13,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-16T15:40:57",
  "op": [
    "comment",
    {
      "parent_author": "",
      "parent_permlink": "programming",
      "author": "eskiesirius",
      "permlink": "method-chaining-in-c",
      "title": "Method Chaining in C#, why bother using it?",
      "body": "<html>\n<p>&nbsp;</p>\n<h1>How to apply Method Chaining in&nbsp;C#</h1>\n<p>Method chaining is a type of implementation pattern that we could reuse/recall a method a couple of times within a single object instantiation without limits. In <a href=\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMethod_chaining\">wikipedia</a>, it’s referred to as:&nbsp;</p>\n<blockquote><em>Also known as named parameter idiom, is a common</em> <a href=\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSyntax_%28programming_languages%29\"><em>syntax</em></a> <em>for invoking multiple method calls in</em> <a href=\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FObject-oriented_programming\"><em>object-oriented programming languages</em></a><em>. Each method returns an object, allowing the calls to be chained together in a single statement without requiring variables to store the intermediate results.</em></blockquote>\n<p>If used properly, we can create a more efficient pattern which improves code readability in the long run. Another term for this implementation is called <em><strong>Fluent Interface</strong></em> which acts as if you were building a sentence.I first noticed this pattern when I was using jquery than I was using C#, so I got intrigued and curious whether the pattern was even applicable in the first place in my main programming language.&nbsp;Later on I discovered in some of my advanced projects where we use methodologies such as <em><strong>Unit Tests</strong></em> and doing some fluent mapping in <em><strong>NHibernate</strong></em>, Method Chaining becomes noticeable later on.</p>\n<h3>Okay, so why do we need to use method chaining&nbsp;exactly?</h3>\n<p>There are a couple of reasons why you might want to implement method chaining into your project or library you were working on. One of the few reason for this is its <em><strong>readability purposes</strong></em>. Ever since at the start we love to simplify our code through a lot of patterns. And from that idea alone, we now have dozens of frameworks and patterns thanks to our laziness and thinking that loves innovation.Here are other few reasons why we need to use method chaining:</p>\n<ul>\n  <li>Allows you to create Domain Specific Languages (DSL)</li>\n  <li>Improves reusability</li>\n  <li>Direct</li>\n  <li>Expressive</li>\n</ul>\n<h3>Getting Started</h3>\n<p>In this sample, we’re going to use C# as our programming language for implementing method chaining. Just simply create new project and select console app for this demonstration.Now let’s get started!</p>\n<h3>Starting out — the singleton pattern</h3>\n<p>To apply method chaining more efficient and cleaner, we must know the use of pattern known as the <em><strong>“Singleton Pattern”</strong></em>. Now what is a singleton pattern?I’m sure you’ve heard a lot from developers about the term <em><strong>“Singleton”</strong></em>Pattern that they were using from time to time.If you’re not aware of it, <a href=\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSingleton_pattern\">Singleton Pattern</a> is one of the Design Patterns where it restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system.In a more simplified terms, a Singleton Pattern limits your object to only <em><strong>one instantiation</strong></em>. This is because every time we instantiate an object, it’s considered another object that was created behind the scenes even though we’re instantiating the same class. Singleton Pattern prevents that from happening.Let’s take a look at this example:</p>\n<pre><code>public class MySingleton {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private static MySingleton _instance = null;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static MySingleton CreateInstance() {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (_instance == null) {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new MySingleton();<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n <br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n}</code></pre>\n<p>In this example, we have the class called MySingleton and a method of CreateInstance. The purpose of this method is to leave the instantiation to it, effectively instantiating the object once only.Once <em><strong>_instance</strong></em> variable was instantiated with an object, we can no longer instantiate it again because it’s not null anymore. So when we use <em><strong>CreateInstance()</strong></em> to create an instantiation in both variables that we will use, it will still use the same instance that was created by the method, effectively referencing both variables with the same object instance.</p>\n<h4>Now why do I need this&nbsp;anyway?</h4>\n<p>This is done mainly to preserve and lock the values of the properties of that instance. When we do not implement singleton pattern, the values of your properties and fields would be swiped clean and can never be reused again as you’re effectively using another object as an instance.It’s worthy to take note that Method Chaining relies on fields or properties that you’re going to reuse behind the scenes in order to make it possible to produce an output using Chaining.</p>\n<h3>Setting up the method chain — proper class structure</h3>\n<p>Now let’s proceed with the main topic, setting up our method chain.Without further ado, I’ll show you some sample structure of method chaining. Let’s use the <strong>Dog</strong> class as a simple sample for our demonstration:</p>\n<pre><code>public class Dog {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private static Dog _instance;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Dog() {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new Dog();<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static Dog Instance() {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (_instance == null) {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new Dog();<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n <br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n <br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Dog Bark() {<br>\n <br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(\"The dog barks!\");<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n <br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Dog Eat() {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(\"The dog eats!\");<br>\n <br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n <br>\n &nbsp;&nbsp;&nbsp;}</code></pre>\n<p>And execute this class in our <strong>program.cs</strong>:</p>\n<pre><code>static void Main(string[] args) {<br>\n <br>\n &nbsp;&nbsp;&nbsp;Dog.Instance()<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Bark()<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Bark()<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Bark()<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Eat(); //the dog barks 3 times and eats his food!!<br>\n <br>\n}</code></pre>\n<p>And the corresponding output in console is:</p>\n<p><img src=\"https://cdn-images-1.medium.com/max/1600/1*6sMeMVMK9S1RNLDbsTLlWw.png\" width=\"1600\" height=\"875\"/></p>\n<p>Touche isn’t it?This is how you usually structure your method chain. One thing you’ll notice here is we let the <em><strong>Instance()</strong></em> static method do the instantiation for us. Although you could also do the instantiation on your own like so:</p>\n<pre><code>var mydog = new Dog();<br>\nmydog<br>\n &nbsp;&nbsp;&nbsp;.Bark()<br>\n &nbsp;&nbsp;&nbsp;.Bark()<br>\n &nbsp;&nbsp;&nbsp;.Eat();</code></pre>\n<p>I personally believe it’s more verbose and more understandable when you let the method do the instantiation to increase its readability. The choice depends on you.But I would like your attention to focus on the remaining two methods I haven’t explained: <em><strong>Bark()</strong></em> and <em><strong>Eat()</strong></em>This is the pattern that invokes method chaining. So both <em><strong>Bark()</strong></em> and <em><strong>Eat()</strong></em>methods were returning the instance where they were sitting. Now with that setup, you can chain them for whatever you like endlessly without limits!</p>\n<h3>A more practical sample — Creating a&nbsp;library</h3>\n<p>Now that we already know how to setup our method chain, let’s move on to more practical sample we could do to harness C#’s capabilities.We’re going to create our own <em><strong>Unit Test</strong></em> library. <em><strong>Unit Testing</strong></em> by definition is is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. Unit testing can be done manually but is often automated.So for our own Unit Test library, let’s consider this one as a starting point.Name it <em><strong>Assertion</strong></em>:</p>\n<pre><code>public class Assertion {<br>\n <br>\n &nbsp;&nbsp;&nbsp;private static Assertion _instance;<br>\n &nbsp;&nbsp;&nbsp;private static int mygiven;<br>\n &nbsp;&nbsp;&nbsp;public static Assertion Given(int given) {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (_instance == null) {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new Assertion();<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mygiven = given;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br>\n &nbsp;&nbsp;&nbsp;}<br>\n <br>\n &nbsp;&nbsp;&nbsp;public Assertion AreEqual(int equal) {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (mygiven == equal) {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(\"They're equal!\");<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(\"Not equal!\");<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br>\n &nbsp;&nbsp;&nbsp;}<br>\n}</code></pre>\n<p>Now let’s use the library to test the results:</p>\n<pre><code>var given = 5 + 5;<br>\nAssertion.Given(given)<br>\n &nbsp;&nbsp;&nbsp;.AreEqual(10)<br>\n &nbsp;&nbsp;&nbsp;.AreEqual(5);</code></pre>\n<p>And our output in console is:</p>\n<p><img src=\"https://cdn-images-1.medium.com/max/1600/1*Y52lY2ecPfU5n6rE8ojQvg.png\" width=\"1600\" height=\"875\"/></p>\n<p>In the code, we’ve created our own Unit Test library and check whether the given value passes in our expected output which is provided in <em><strong>AreEqual()</strong></em>method.Through <em><strong>Method Chaining</strong></em>, our library is more fluent, understandable, and easier to read. You can also implement the Assertion library without using fluent interface or method chaining. But personally it’s more readable and understandable to use for consumers of your library if you’re gonna implement it fluently. Non-programmers can also benefit from using it since it’s easy to tell how to use it.</p>\n<h3>Wrapping everything up</h3>\n<p>I hope you enjoyed learning this lesson. This pattern can also be applied in other programming languages such as <em><strong>javascript</strong></em> since it’s where I first saw the pattern of method chaining.&nbsp;</p>\n</html>",
      "json_metadata": "{\"tags\":[\"programming\",\"tips\",\"oop\",\"chaining\",\"csharp\"],\"image\":[\"https://cdn-images-1.medium.com/max/1600/1*6sMeMVMK9S1RNLDbsTLlWw.png\",\"https://cdn-images-1.medium.com/max/1600/1*Y52lY2ecPfU5n6rE8ojQvg.png\"],\"links\":[\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMethod_chaining\",\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSyntax_%28programming_languages%29\",\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FObject-oriented_programming\",\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSingleton_pattern\"],\"app\":\"steemit/0.1\",\"format\":\"html\"}"
    }
  ]
}
eskiesiriuspublished a new post: method-chaining-in-c
2017/10/16 15:36:57
parent author
parent permlinkprogramming
authoreskiesirius
permlinkmethod-chaining-in-c
titleMethod Chaining in C#
body<html> <p>&nbsp;</p> <h1>How to apply Method Chaining in&nbsp;C#</h1> <p>Method chaining is a type of implementation pattern that we could reuse/recall a method a couple of times within a single object instantiation without limits. In <a href="https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMethod_chaining">wikipedia</a>, it’s referred to as:&nbsp;</p> <blockquote><em>Also known as named parameter idiom, is a common</em> <a href="https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSyntax_%28programming_languages%29"><em>syntax</em></a> <em>for invoking multiple method calls in</em> <a href="https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FObject-oriented_programming"><em>object-oriented programming languages</em></a><em>. Each method returns an object, allowing the calls to be chained together in a single statement without requiring variables to store the intermediate results.</em></blockquote> <p>If used properly, we can create a more efficient pattern which improves code readability in the long run. Another term for this implementation is called <em><strong>Fluent Interface</strong></em> which acts as if you were building a sentence.I first noticed this pattern when I was using jquery than I was using C#, so I got intrigued and curious whether the pattern was even applicable in the first place in my main programming language.&nbsp;Later on I discovered in some of my advanced projects where we use methodologies such as <em><strong>Unit Tests</strong></em> and doing some fluent mapping in <em><strong>NHibernate</strong></em>, Method Chaining becomes noticeable later on.</p> <h3>Okay, so why do we need to use method chaining&nbsp;exactly?</h3> <p>There are a couple of reasons why you might want to implement method chaining into your project or library you were working on. One of the few reason for this is its <em><strong>readability purposes</strong></em>. Ever since at the start we love to simplify our code through a lot of patterns. And from that idea alone, we now have dozens of frameworks and patterns thanks to our laziness and thinking that loves innovation.Here are other few reasons why we need to use method chaining:</p> <ul> <li>Allows you to create Domain Specific Languages (DSL)</li> <li>Improves reusability</li> <li>Direct</li> <li>Expressive</li> </ul> <h3>Getting Started</h3> <p>In this sample, we’re going to use C# as our programming language for implementing method chaining. Just simply create new project and select console app for this demonstration.Now let’s get started!</p> <h3>Starting out — the singleton pattern</h3> <p>To apply method chaining more efficient and cleaner, we must know the use of pattern known as the <em><strong>“Singleton Pattern”</strong></em>. Now what is a singleton pattern?I’m sure you’ve heard a lot from developers about the term <em><strong>“Singleton”</strong></em>Pattern that they were using from time to time.If you’re not aware of it, <a href="https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSingleton_pattern">Singleton Pattern</a> is one of the Design Patterns where it restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system.In a more simplified terms, a Singleton Pattern limits your object to only <em><strong>one instantiation</strong></em>. This is because every time we instantiate an object, it’s considered another object that was created behind the scenes even though we’re instantiating the same class. Singleton Pattern prevents that from happening.Let’s take a look at this example:</p> <pre><code>public class MySingleton {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private static MySingleton _instance = null;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static MySingleton CreateInstance() {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (_instance == null) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new MySingleton();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> }</code></pre> <p>In this example, we have the class called MySingleton and a method of CreateInstance. The purpose of this method is to leave the instantiation to it, effectively instantiating the object once only.Once <em><strong>_instance</strong></em> variable was instantiated with an object, we can no longer instantiate it again because it’s not null anymore. So when we use <em><strong>CreateInstance()</strong></em> to create an instantiation in both variables that we will use, it will still use the same instance that was created by the method, effectively referencing both variables with the same object instance.</p> <h4>Now why do I need this&nbsp;anyway?</h4> <p>This is done mainly to preserve and lock the values of the properties of that instance. When we do not implement singleton pattern, the values of your properties and fields would be swiped clean and can never be reused again as you’re effectively using another object as an instance.It’s worthy to take note that Method Chaining relies on fields or properties that you’re going to reuse behind the scenes in order to make it possible to produce an output using Chaining.</p> <h3>Setting up the method chain — proper class structure</h3> <p>Now let’s proceed with the main topic, setting up our method chain.Without further ado, I’ll show you some sample structure of method chaining. Let’s use the <strong>Dog</strong> class as a simple sample for our demonstration:</p> <pre><code>public class Dog {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private static Dog _instance;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Dog() {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new Dog();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static Dog Instance() {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (_instance == null) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new Dog();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Dog Bark() {<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine("The dog barks!");<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Dog Eat() {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine("The dog eats!");<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> <br> &nbsp;&nbsp;&nbsp;}</code></pre> <p>And execute this class in our <strong>program.cs</strong>:</p> <pre><code>static void Main(string[] args) {<br> <br> &nbsp;&nbsp;&nbsp;Dog.Instance()<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Bark()<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Bark()<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Bark()<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Eat(); //the dog barks 3 times and eats his food!!<br> <br> }</code></pre> <p>And the corresponding output in console is:</p> <p><img src="https://cdn-images-1.medium.com/max/1600/1*6sMeMVMK9S1RNLDbsTLlWw.png" width="1600" height="875"/></p> <p>Touche isn’t it?This is how you usually structure your method chain. One thing you’ll notice here is we let the <em><strong>Instance()</strong></em> static method do the instantiation for us. Although you could also do the instantiation on your own like so:</p> <pre><code>var mydog = new Dog();<br> mydog<br> &nbsp;&nbsp;&nbsp;.Bark()<br> &nbsp;&nbsp;&nbsp;.Bark()<br> &nbsp;&nbsp;&nbsp;.Eat();</code></pre> <p>I personally believe it’s more verbose and more understandable when you let the method do the instantiation to increase its readability. The choice depends on you.But I would like your attention to focus on the remaining two methods I haven’t explained: <em><strong>Bark()</strong></em> and <em><strong>Eat()</strong></em>This is the pattern that invokes method chaining. So both <em><strong>Bark()</strong></em> and <em><strong>Eat()</strong></em>methods were returning the instance where they were sitting. Now with that setup, you can chain them for whatever you like endlessly without limits!</p> <h3>A more practical sample — Creating a&nbsp;library</h3> <p>Now that we already know how to setup our method chain, let’s move on to more practical sample we could do to harness C#’s capabilities.We’re going to create our own <em><strong>Unit Test</strong></em> library. <em><strong>Unit Testing</strong></em> by definition is is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. Unit testing can be done manually but is often automated.So for our own Unit Test library, let’s consider this one as a starting point.Name it <em><strong>Assertion</strong></em>:</p> <pre><code>public class Assertion {<br> <br> &nbsp;&nbsp;&nbsp;private static Assertion _instance;<br> &nbsp;&nbsp;&nbsp;private static int mygiven;<br> &nbsp;&nbsp;&nbsp;public static Assertion Given(int given) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (_instance == null) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new Assertion();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mygiven = given;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br> &nbsp;&nbsp;&nbsp;}<br> <br> &nbsp;&nbsp;&nbsp;public Assertion AreEqual(int equal) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (mygiven == equal) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine("They're equal!");<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine("Not equal!");<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br> &nbsp;&nbsp;&nbsp;}<br> }</code></pre> <p>Now let’s use the library to test the results:</p> <pre><code>var given = 5 + 5;<br> Assertion.Given(given)<br> &nbsp;&nbsp;&nbsp;.AreEqual(10)<br> &nbsp;&nbsp;&nbsp;.AreEqual(5);</code></pre> <p>And our output in console is:</p> <p><img src="https://cdn-images-1.medium.com/max/1600/1*Y52lY2ecPfU5n6rE8ojQvg.png" width="1600" height="875"/></p> <p>In the code, we’ve created our own Unit Test library and check whether the given value passes in our expected output which is provided in <em><strong>AreEqual()</strong></em>method.Through <em><strong>Method Chaining</strong></em>, our library is more fluent, understandable, and easier to read. You can also implement the Assertion library without using fluent interface or method chaining. But personally it’s more readable and understandable to use for consumers of your library if you’re gonna implement it fluently. Non-programmers can also benefit from using it since it’s easy to tell how to use it.</p> <h3>Wrapping everything up</h3> <p>I hope you enjoyed learning this lesson. This pattern can also be applied in other programming languages such as <em><strong>javascript</strong></em> since it’s where I first saw the pattern of method chaining.&nbsp;</p> </html>
json metadata{"tags":["programming","tips","oop","chaining","csharp"],"image":["https://cdn-images-1.medium.com/max/1600/1*6sMeMVMK9S1RNLDbsTLlWw.png","https://cdn-images-1.medium.com/max/1600/1*Y52lY2ecPfU5n6rE8ojQvg.png"],"links":["https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMethod_chaining","https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSyntax_%28programming_languages%29","https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FObject-oriented_programming","https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSingleton_pattern"],"app":"steemit/0.1","format":"html"}
Transaction InfoBlock #16383696/Trx 6ee887fbf601bec63ed258657298d3084e0fc042
View Raw JSON Data
{
  "trx_id": "6ee887fbf601bec63ed258657298d3084e0fc042",
  "block": 16383696,
  "trx_in_block": 23,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-16T15:36:57",
  "op": [
    "comment",
    {
      "parent_author": "",
      "parent_permlink": "programming",
      "author": "eskiesirius",
      "permlink": "method-chaining-in-c",
      "title": "Method Chaining in C#",
      "body": "<html>\n<p>&nbsp;</p>\n<h1>How to apply Method Chaining in&nbsp;C#</h1>\n<p>Method chaining is a type of implementation pattern that we could reuse/recall a method a couple of times within a single object instantiation without limits. In <a href=\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMethod_chaining\">wikipedia</a>, it’s referred to as:&nbsp;</p>\n<blockquote><em>Also known as named parameter idiom, is a common</em> <a href=\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSyntax_%28programming_languages%29\"><em>syntax</em></a> <em>for invoking multiple method calls in</em> <a href=\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FObject-oriented_programming\"><em>object-oriented programming languages</em></a><em>. Each method returns an object, allowing the calls to be chained together in a single statement without requiring variables to store the intermediate results.</em></blockquote>\n<p>If used properly, we can create a more efficient pattern which improves code readability in the long run. Another term for this implementation is called <em><strong>Fluent Interface</strong></em> which acts as if you were building a sentence.I first noticed this pattern when I was using jquery than I was using C#, so I got intrigued and curious whether the pattern was even applicable in the first place in my main programming language.&nbsp;Later on I discovered in some of my advanced projects where we use methodologies such as <em><strong>Unit Tests</strong></em> and doing some fluent mapping in <em><strong>NHibernate</strong></em>, Method Chaining becomes noticeable later on.</p>\n<h3>Okay, so why do we need to use method chaining&nbsp;exactly?</h3>\n<p>There are a couple of reasons why you might want to implement method chaining into your project or library you were working on. One of the few reason for this is its <em><strong>readability purposes</strong></em>. Ever since at the start we love to simplify our code through a lot of patterns. And from that idea alone, we now have dozens of frameworks and patterns thanks to our laziness and thinking that loves innovation.Here are other few reasons why we need to use method chaining:</p>\n<ul>\n  <li>Allows you to create Domain Specific Languages (DSL)</li>\n  <li>Improves reusability</li>\n  <li>Direct</li>\n  <li>Expressive</li>\n</ul>\n<h3>Getting Started</h3>\n<p>In this sample, we’re going to use C# as our programming language for implementing method chaining. Just simply create new project and select console app for this demonstration.Now let’s get started!</p>\n<h3>Starting out — the singleton pattern</h3>\n<p>To apply method chaining more efficient and cleaner, we must know the use of pattern known as the <em><strong>“Singleton Pattern”</strong></em>. Now what is a singleton pattern?I’m sure you’ve heard a lot from developers about the term <em><strong>“Singleton”</strong></em>Pattern that they were using from time to time.If you’re not aware of it, <a href=\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSingleton_pattern\">Singleton Pattern</a> is one of the Design Patterns where it restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system.In a more simplified terms, a Singleton Pattern limits your object to only <em><strong>one instantiation</strong></em>. This is because every time we instantiate an object, it’s considered another object that was created behind the scenes even though we’re instantiating the same class. Singleton Pattern prevents that from happening.Let’s take a look at this example:</p>\n<pre><code>public class MySingleton {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private static MySingleton _instance = null;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static MySingleton CreateInstance() {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (_instance == null) {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new MySingleton();<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n <br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n}</code></pre>\n<p>In this example, we have the class called MySingleton and a method of CreateInstance. The purpose of this method is to leave the instantiation to it, effectively instantiating the object once only.Once <em><strong>_instance</strong></em> variable was instantiated with an object, we can no longer instantiate it again because it’s not null anymore. So when we use <em><strong>CreateInstance()</strong></em> to create an instantiation in both variables that we will use, it will still use the same instance that was created by the method, effectively referencing both variables with the same object instance.</p>\n<h4>Now why do I need this&nbsp;anyway?</h4>\n<p>This is done mainly to preserve and lock the values of the properties of that instance. When we do not implement singleton pattern, the values of your properties and fields would be swiped clean and can never be reused again as you’re effectively using another object as an instance.It’s worthy to take note that Method Chaining relies on fields or properties that you’re going to reuse behind the scenes in order to make it possible to produce an output using Chaining.</p>\n<h3>Setting up the method chain — proper class structure</h3>\n<p>Now let’s proceed with the main topic, setting up our method chain.Without further ado, I’ll show you some sample structure of method chaining. Let’s use the <strong>Dog</strong> class as a simple sample for our demonstration:</p>\n<pre><code>public class Dog {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private static Dog _instance;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Dog() {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new Dog();<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static Dog Instance() {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (_instance == null) {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new Dog();<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n <br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n <br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Dog Bark() {<br>\n <br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(\"The dog barks!\");<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n <br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Dog Eat() {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(\"The dog eats!\");<br>\n <br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n <br>\n &nbsp;&nbsp;&nbsp;}</code></pre>\n<p>And execute this class in our <strong>program.cs</strong>:</p>\n<pre><code>static void Main(string[] args) {<br>\n <br>\n &nbsp;&nbsp;&nbsp;Dog.Instance()<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Bark()<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Bark()<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Bark()<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Eat(); //the dog barks 3 times and eats his food!!<br>\n <br>\n}</code></pre>\n<p>And the corresponding output in console is:</p>\n<p><img src=\"https://cdn-images-1.medium.com/max/1600/1*6sMeMVMK9S1RNLDbsTLlWw.png\" width=\"1600\" height=\"875\"/></p>\n<p>Touche isn’t it?This is how you usually structure your method chain. One thing you’ll notice here is we let the <em><strong>Instance()</strong></em> static method do the instantiation for us. Although you could also do the instantiation on your own like so:</p>\n<pre><code>var mydog = new Dog();<br>\nmydog<br>\n &nbsp;&nbsp;&nbsp;.Bark()<br>\n &nbsp;&nbsp;&nbsp;.Bark()<br>\n &nbsp;&nbsp;&nbsp;.Eat();</code></pre>\n<p>I personally believe it’s more verbose and more understandable when you let the method do the instantiation to increase its readability. The choice depends on you.But I would like your attention to focus on the remaining two methods I haven’t explained: <em><strong>Bark()</strong></em> and <em><strong>Eat()</strong></em>This is the pattern that invokes method chaining. So both <em><strong>Bark()</strong></em> and <em><strong>Eat()</strong></em>methods were returning the instance where they were sitting. Now with that setup, you can chain them for whatever you like endlessly without limits!</p>\n<h3>A more practical sample — Creating a&nbsp;library</h3>\n<p>Now that we already know how to setup our method chain, let’s move on to more practical sample we could do to harness C#’s capabilities.We’re going to create our own <em><strong>Unit Test</strong></em> library. <em><strong>Unit Testing</strong></em> by definition is is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. Unit testing can be done manually but is often automated.So for our own Unit Test library, let’s consider this one as a starting point.Name it <em><strong>Assertion</strong></em>:</p>\n<pre><code>public class Assertion {<br>\n <br>\n &nbsp;&nbsp;&nbsp;private static Assertion _instance;<br>\n &nbsp;&nbsp;&nbsp;private static int mygiven;<br>\n &nbsp;&nbsp;&nbsp;public static Assertion Given(int given) {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (_instance == null) {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_instance = new Assertion();<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mygiven = given;<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br>\n &nbsp;&nbsp;&nbsp;}<br>\n <br>\n &nbsp;&nbsp;&nbsp;public Assertion AreEqual(int equal) {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (mygiven == equal) {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(\"They're equal!\");<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(\"Not equal!\");<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _instance;<br>\n &nbsp;&nbsp;&nbsp;}<br>\n}</code></pre>\n<p>Now let’s use the library to test the results:</p>\n<pre><code>var given = 5 + 5;<br>\nAssertion.Given(given)<br>\n &nbsp;&nbsp;&nbsp;.AreEqual(10)<br>\n &nbsp;&nbsp;&nbsp;.AreEqual(5);</code></pre>\n<p>And our output in console is:</p>\n<p><img src=\"https://cdn-images-1.medium.com/max/1600/1*Y52lY2ecPfU5n6rE8ojQvg.png\" width=\"1600\" height=\"875\"/></p>\n<p>In the code, we’ve created our own Unit Test library and check whether the given value passes in our expected output which is provided in <em><strong>AreEqual()</strong></em>method.Through <em><strong>Method Chaining</strong></em>, our library is more fluent, understandable, and easier to read. You can also implement the Assertion library without using fluent interface or method chaining. But personally it’s more readable and understandable to use for consumers of your library if you’re gonna implement it fluently. Non-programmers can also benefit from using it since it’s easy to tell how to use it.</p>\n<h3>Wrapping everything up</h3>\n<p>I hope you enjoyed learning this lesson. This pattern can also be applied in other programming languages such as <em><strong>javascript</strong></em> since it’s where I first saw the pattern of method chaining.&nbsp;</p>\n</html>",
      "json_metadata": "{\"tags\":[\"programming\",\"tips\",\"oop\",\"chaining\",\"csharp\"],\"image\":[\"https://cdn-images-1.medium.com/max/1600/1*6sMeMVMK9S1RNLDbsTLlWw.png\",\"https://cdn-images-1.medium.com/max/1600/1*Y52lY2ecPfU5n6rE8ojQvg.png\"],\"links\":[\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMethod_chaining\",\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSyntax_%28programming_languages%29\",\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FObject-oriented_programming\",\"https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSingleton_pattern\"],\"app\":\"steemit/0.1\",\"format\":\"html\"}"
    }
  ]
}
2017/10/16 15:33:33
required auths[]
required posting auths["eskiesirius"]
idfollow
json["follow",{"follower":"eskiesirius","following":"jethmagno0011","what":["blog"]}]
Transaction InfoBlock #16383628/Trx dd38b8b5fdfa7ecf775e9e720424afa24148655f
View Raw JSON Data
{
  "trx_id": "dd38b8b5fdfa7ecf775e9e720424afa24148655f",
  "block": 16383628,
  "trx_in_block": 18,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-16T15:33:33",
  "op": [
    "custom_json",
    {
      "required_auths": [],
      "required_posting_auths": [
        "eskiesirius"
      ],
      "id": "follow",
      "json": "[\"follow\",{\"follower\":\"eskiesirius\",\"following\":\"jethmagno0011\",\"what\":[\"blog\"]}]"
    }
  ]
}
steemdelegated 18.321 SP to @eskiesirius
2017/10/13 05:12:27
delegatorsteem
delegateeeskiesirius
vesting shares29832.871467 VESTS
Transaction InfoBlock #16285245/Trx 605c9f22f377f499b9d02b2836ce5376934e32bc
View Raw JSON Data
{
  "trx_id": "605c9f22f377f499b9d02b2836ce5376934e32bc",
  "block": 16285245,
  "trx_in_block": 2,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-13T05:12:27",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "eskiesirius",
      "vesting_shares": "29832.871467 VESTS"
    }
  ]
}
2017/10/09 02:49:24
votereskiesirius
authorjethmagno0011
permlinkwhy-you-should-have-a-pet
weight10000 (100.00%)
Transaction InfoBlock #16167264/Trx 471733b8fdd1c01d618824900c395f22834d9b58
View Raw JSON Data
{
  "trx_id": "471733b8fdd1c01d618824900c395f22834d9b58",
  "block": 16167264,
  "trx_in_block": 0,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-09T02:49:24",
  "op": [
    "vote",
    {
      "voter": "eskiesirius",
      "author": "jethmagno0011",
      "permlink": "why-you-should-have-a-pet",
      "weight": 10000
    }
  ]
}
2017/10/06 03:40:00
votereskiesirius
authoreskiesirius
permlinkintroducing-my-awesome-self
weight10000 (100.00%)
Transaction InfoBlock #16081893/Trx 7e96d40e392795a527dff56ac78a705548c46fd7
View Raw JSON Data
{
  "trx_id": "7e96d40e392795a527dff56ac78a705548c46fd7",
  "block": 16081893,
  "trx_in_block": 11,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-06T03:40:00",
  "op": [
    "vote",
    {
      "voter": "eskiesirius",
      "author": "eskiesirius",
      "permlink": "introducing-my-awesome-self",
      "weight": 10000
    }
  ]
}
2017/10/06 03:37:03
parent author
parent permlinkmagic
authoreskiesirius
permlinkintroducing-my-awesome-self
titleIntroducing my awesome self!
bodyOnce upon a time, there was a boy who just earned $1M in just 2 weeks and he donated it in the church but unfortunately it is not part of my awesome story. Lets go proceed to my story, I am just a normal person who just messing around the internet and find some awesome topics. Warning! Proceed with Caution! The paragraph that you are going to read next will be devastating. *Hey! I love magic, have you ever experience the feeling that you almost **FORGOT** your name? it is like when you are answering a test then suddenly you just had a **MENTAL BLOCK** and now you are trying to remember your name but you **CAN'T** remember it? It is like the more you try to remember, the more you will **FORGET**? But later on you just remembered your name and **NOW** you are wondering how awesome experience it was.* Anyway I am a: - magician - martial artist - programmer - traveler - business enthusiast - dancer - frustrated singer Unfortunately I'm not a content writer. Thank you steemit for allowing me to join this website.
json metadata{"tags":["magic","programmer","introduction","awesome","steemit"],"app":"steemit/0.1","format":"markdown"}
Transaction InfoBlock #16081834/Trx 28bc977aea96d01138fcbc2a1c1d3f7c00164d8b
View Raw JSON Data
{
  "trx_id": "28bc977aea96d01138fcbc2a1c1d3f7c00164d8b",
  "block": 16081834,
  "trx_in_block": 15,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-06T03:37:03",
  "op": [
    "comment",
    {
      "parent_author": "",
      "parent_permlink": "magic",
      "author": "eskiesirius",
      "permlink": "introducing-my-awesome-self",
      "title": "Introducing my awesome self!",
      "body": "Once upon a time, there was a boy who just earned $1M in just 2 weeks and he donated it in the church but unfortunately it is not part of my awesome story. Lets go proceed to my story, I am just a normal person who just messing around the internet and find some awesome topics. \n\nWarning! Proceed with Caution!  The paragraph that you are going to read next will be devastating.\n\n*Hey! I love magic, have you ever experience the feeling that you almost **FORGOT** your name? it is like when you are answering a test then suddenly you just had a **MENTAL BLOCK** and now you are trying to remember your name but you **CAN'T** remember it? It is like the more you try to remember, the more  you will **FORGET**? But later on you just remembered your name and **NOW** you are wondering how awesome experience it was.*\n\nAnyway I am a:\n- magician\n- martial artist\n- programmer\n- traveler\n- business enthusiast\n- dancer\n- frustrated singer\n\nUnfortunately I'm not a content writer.\n\nThank you steemit for allowing me to join this website.",
      "json_metadata": "{\"tags\":[\"magic\",\"programmer\",\"introduction\",\"awesome\",\"steemit\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
    }
  ]
}
eskiesiriusupdated their account properties
2017/10/06 02:52:30
accounteskiesirius
memo keySTM63LKnX7uVAB7c4cRTi7eTz6SxXmiDMN1RFgzmsmz78GWFnxmdB
json metadata{"profile":{"name":"Eskie Maquilang","location":"Mandaue City","website":"http://www.cebuhotellists.com","about":"The awesome programmer","profile_image":"https://scontent.fmnl4-4.fna.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/252225_10153618150333329_6290430562094952122_n.jpg?efg=eyJpIjoidCJ9&_nc_eui2=v1%3AAeGoRpL7Q4NuATWGgtABadIDA4_-j1r3h9GkruJVqc6c0EvBbTGteQabxQlqkM0jmUaAh1lz_dWNd89vC6rMmeL9wSMpwyK6TXjwhgNHpWoB9Q&oh=df94e3e82138f9079c2e61245ccb59e6&oe=5A460350"}}
Transaction InfoBlock #16080945/Trx cc54492f1ad995521abcf982f5b20d7515832b57
View Raw JSON Data
{
  "trx_id": "cc54492f1ad995521abcf982f5b20d7515832b57",
  "block": 16080945,
  "trx_in_block": 27,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-06T02:52:30",
  "op": [
    "account_update",
    {
      "account": "eskiesirius",
      "memo_key": "STM63LKnX7uVAB7c4cRTi7eTz6SxXmiDMN1RFgzmsmz78GWFnxmdB",
      "json_metadata": "{\"profile\":{\"name\":\"Eskie Maquilang\",\"location\":\"Mandaue City\",\"website\":\"http://www.cebuhotellists.com\",\"about\":\"The awesome programmer\",\"profile_image\":\"https://scontent.fmnl4-4.fna.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/252225_10153618150333329_6290430562094952122_n.jpg?efg=eyJpIjoidCJ9&_nc_eui2=v1%3AAeGoRpL7Q4NuATWGgtABadIDA4_-j1r3h9GkruJVqc6c0EvBbTGteQabxQlqkM0jmUaAh1lz_dWNd89vC6rMmeL9wSMpwyK6TXjwhgNHpWoB9Q&oh=df94e3e82138f9079c2e61245ccb59e6&oe=5A460350\"}}"
    }
  ]
}
eskiesiriusupdated their account properties
2017/10/06 02:51:15
accounteskiesirius
memo keySTM63LKnX7uVAB7c4cRTi7eTz6SxXmiDMN1RFgzmsmz78GWFnxmdB
json metadata{"profile":{"name":"Eskie Maquilang","location":"Mandaue City","website":"http://www.cebuhotellists.com","about":"The awesome programmer"}}
Transaction InfoBlock #16080920/Trx 2ba86981b6e7a87b5a15c9a775a0772ab91d252d
View Raw JSON Data
{
  "trx_id": "2ba86981b6e7a87b5a15c9a775a0772ab91d252d",
  "block": 16080920,
  "trx_in_block": 27,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-06T02:51:15",
  "op": [
    "account_update",
    {
      "account": "eskiesirius",
      "memo_key": "STM63LKnX7uVAB7c4cRTi7eTz6SxXmiDMN1RFgzmsmz78GWFnxmdB",
      "json_metadata": "{\"profile\":{\"name\":\"Eskie Maquilang\",\"location\":\"Mandaue City\",\"website\":\"http://www.cebuhotellists.com\",\"about\":\"The awesome programmer\"}}"
    }
  ]
}
eskiesiriusupdated their account properties
2017/10/06 02:48:48
accounteskiesirius
memo keySTM63LKnX7uVAB7c4cRTi7eTz6SxXmiDMN1RFgzmsmz78GWFnxmdB
json metadata{"profile":{"name":"Eskie Maquilang","location":"Mandaue City","website":"http://www.cebuhotellists.com"}}
Transaction InfoBlock #16080871/Trx 6cb23c7112e4c401c7460a5c25cc9e1c6e2acb40
View Raw JSON Data
{
  "trx_id": "6cb23c7112e4c401c7460a5c25cc9e1c6e2acb40",
  "block": 16080871,
  "trx_in_block": 23,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-06T02:48:48",
  "op": [
    "account_update",
    {
      "account": "eskiesirius",
      "memo_key": "STM63LKnX7uVAB7c4cRTi7eTz6SxXmiDMN1RFgzmsmz78GWFnxmdB",
      "json_metadata": "{\"profile\":{\"name\":\"Eskie Maquilang\",\"location\":\"Mandaue City\",\"website\":\"http://www.cebuhotellists.com\"}}"
    }
  ]
}
steemcreated a new account: @eskiesirius
2017/10/06 01:46:39
fee0.500 STEEM
delegation57000.000000 VESTS
creatorsteem
new account nameeskiesirius
owner{"weight_threshold":1,"account_auths":[],"key_auths":[["STM8G7kjdQv5sBXnrw9DGEaeNf567JnXn2vuVPaKFBrea4bgQb5tu",1]]}
active{"weight_threshold":1,"account_auths":[],"key_auths":[["STM6XE9FXJ8bQuVhxX6Efb4h5yzP1VxZpnCkdvDfcZvEsvfoZVw1Z",1]]}
posting{"weight_threshold":1,"account_auths":[],"key_auths":[["STM7Paag3Ne4pxkFrM9FawLFGJiT7GVxr3RyKRFsZR1buKFdaoUQ3",1]]}
memo keySTM63LKnX7uVAB7c4cRTi7eTz6SxXmiDMN1RFgzmsmz78GWFnxmdB
json metadata
extensions[]
Transaction InfoBlock #16079629/Trx 5bef1bb9d7169bed018fcf9c9f0cade759d285d3
View Raw JSON Data
{
  "trx_id": "5bef1bb9d7169bed018fcf9c9f0cade759d285d3",
  "block": 16079629,
  "trx_in_block": 42,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2017-10-06T01:46:39",
  "op": [
    "account_create_with_delegation",
    {
      "fee": "0.500 STEEM",
      "delegation": "57000.000000 VESTS",
      "creator": "steem",
      "new_account_name": "eskiesirius",
      "owner": {
        "weight_threshold": 1,
        "account_auths": [],
        "key_auths": [
          [
            "STM8G7kjdQv5sBXnrw9DGEaeNf567JnXn2vuVPaKFBrea4bgQb5tu",
            1
          ]
        ]
      },
      "active": {
        "weight_threshold": 1,
        "account_auths": [],
        "key_auths": [
          [
            "STM6XE9FXJ8bQuVhxX6Efb4h5yzP1VxZpnCkdvDfcZvEsvfoZVw1Z",
            1
          ]
        ]
      },
      "posting": {
        "weight_threshold": 1,
        "account_auths": [],
        "key_auths": [
          [
            "STM7Paag3Ne4pxkFrM9FawLFGJiT7GVxr3RyKRFsZR1buKFdaoUQ3",
            1
          ]
        ]
      },
      "memo_key": "STM63LKnX7uVAB7c4cRTi7eTz6SxXmiDMN1RFgzmsmz78GWFnxmdB",
      "json_metadata": "",
      "extensions": []
    }
  ]
}

Account Metadata

POSTING JSON METADATA
profile{"name":"Eskie Maquilang","location":"Mandaue City","website":"http://www.cebuhotellists.com","about":"The awesome programmer","profile_image":"https://scontent.fmnl4-4.fna.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/252225_10153618150333329_6290430562094952122_n.jpg?efg=eyJpIjoidCJ9&_nc_eui2=v1%3AAeGoRpL7Q4NuATWGgtABadIDA4_-j1r3h9GkruJVqc6c0EvBbTGteQabxQlqkM0jmUaAh1lz_dWNd89vC6rMmeL9wSMpwyK6TXjwhgNHpWoB9Q&oh=df94e3e82138f9079c2e61245ccb59e6&oe=5A460350"}
JSON METADATA
profile{"name":"Eskie Maquilang","location":"Mandaue City","website":"http://www.cebuhotellists.com","about":"The awesome programmer","profile_image":"https://scontent.fmnl4-4.fna.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/252225_10153618150333329_6290430562094952122_n.jpg?efg=eyJpIjoidCJ9&_nc_eui2=v1%3AAeGoRpL7Q4NuATWGgtABadIDA4_-j1r3h9GkruJVqc6c0EvBbTGteQabxQlqkM0jmUaAh1lz_dWNd89vC6rMmeL9wSMpwyK6TXjwhgNHpWoB9Q&oh=df94e3e82138f9079c2e61245ccb59e6&oe=5A460350"}
{
  "posting_json_metadata": {
    "profile": {
      "name": "Eskie Maquilang",
      "location": "Mandaue City",
      "website": "http://www.cebuhotellists.com",
      "about": "The awesome programmer",
      "profile_image": "https://scontent.fmnl4-4.fna.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/252225_10153618150333329_6290430562094952122_n.jpg?efg=eyJpIjoidCJ9&_nc_eui2=v1%3AAeGoRpL7Q4NuATWGgtABadIDA4_-j1r3h9GkruJVqc6c0EvBbTGteQabxQlqkM0jmUaAh1lz_dWNd89vC6rMmeL9wSMpwyK6TXjwhgNHpWoB9Q&oh=df94e3e82138f9079c2e61245ccb59e6&oe=5A460350"
    }
  },
  "json_metadata": {
    "profile": {
      "name": "Eskie Maquilang",
      "location": "Mandaue City",
      "website": "http://www.cebuhotellists.com",
      "about": "The awesome programmer",
      "profile_image": "https://scontent.fmnl4-4.fna.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/252225_10153618150333329_6290430562094952122_n.jpg?efg=eyJpIjoidCJ9&_nc_eui2=v1%3AAeGoRpL7Q4NuATWGgtABadIDA4_-j1r3h9GkruJVqc6c0EvBbTGteQabxQlqkM0jmUaAh1lz_dWNd89vC6rMmeL9wSMpwyK6TXjwhgNHpWoB9Q&oh=df94e3e82138f9079c2e61245ccb59e6&oe=5A460350"
    }
  }
}

Auth Keys

Owner
Single Signature
Public Keys
STM8G7kjdQv5sBXnrw9DGEaeNf567JnXn2vuVPaKFBrea4bgQb5tu1/1
Active
Single Signature
Public Keys
STM6XE9FXJ8bQuVhxX6Efb4h5yzP1VxZpnCkdvDfcZvEsvfoZVw1Z1/1
Posting
Single Signature
Public Keys
STM7Paag3Ne4pxkFrM9FawLFGJiT7GVxr3RyKRFsZR1buKFdaoUQ31/1
Memo
STM63LKnX7uVAB7c4cRTi7eTz6SxXmiDMN1RFgzmsmz78GWFnxmdB
{
  "owner": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM8G7kjdQv5sBXnrw9DGEaeNf567JnXn2vuVPaKFBrea4bgQb5tu",
        1
      ]
    ]
  },
  "active": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM6XE9FXJ8bQuVhxX6Efb4h5yzP1VxZpnCkdvDfcZvEsvfoZVw1Z",
        1
      ]
    ]
  },
  "posting": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM7Paag3Ne4pxkFrM9FawLFGJiT7GVxr3RyKRFsZR1buKFdaoUQ3",
        1
      ]
    ]
  },
  "memo": "STM63LKnX7uVAB7c4cRTi7eTz6SxXmiDMN1RFgzmsmz78GWFnxmdB"
}

Witness Votes

0 / 30
No active witness votes.
[]