// ReSharper disable InconsistentNaming
namespace Orleans
{
    /// <summary>
    /// The set of error types used by the Orleans runtime libraries for logging errors.
    /// </summary>
    internal enum ErrorCode
    {
        Runtime = 100000,
        Runtime_Error_100001 = Runtime + 1,
        Runtime_Error_100002 = Runtime + 2,
        Runtime_Error_100003 = Runtime + 3,
        Runtime_Error_100004 = Runtime + 4,
        Runtime_Error_100005 = Runtime + 5,
        Runtime_Error_100006 = Runtime + 6,
        Runtime_Error_100007 = Runtime + 7,
        Runtime_Error_100008 = Runtime + 8,
        Runtime_Error_100009 = Runtime + 9,
        Runtime_Error_100010 = Runtime + 10,
        Runtime_Error_100011 = Runtime + 11,
        Runtime_Error_100012 = Runtime + 12,
        Runtime_Error_100013 = Runtime + 13,
        Runtime_Error_100014 = Runtime + 14,
        Runtime_Error_100015 = Runtime + 15,
        Runtime_Error_100016 = Runtime + 16,
        Runtime_Error_100017 = Runtime + 17,
        Runtime_Error_100018 = Runtime + 18,
        Runtime_Error_100019 = Runtime + 19,
        Runtime_Error_100020 = Runtime + 20,
        Runtime_Error_100021 = Runtime + 21,
        Runtime_Error_100022 = Runtime + 22,
        Runtime_Error_100023 = Runtime + 23,
        Runtime_Error_100024 = Runtime + 24,
        Runtime_Error_100025 = Runtime + 25,
        Runtime_Error_100026 = Runtime + 26,
        Runtime_Error_100027 = Runtime + 27,
        Runtime_Error_100028 = Runtime + 28,
        Runtime_Error_100029 = Runtime + 29,
        Runtime_Error_100030 = Runtime + 30,
        Runtime_Error_100031 = Runtime + 31,
        Runtime_Error_100032 = Runtime + 32,
        Runtime_Error_100033 = Runtime + 33,
        Runtime_Error_100034 = Runtime + 34,
        Runtime_Error_100035 = Runtime + 35,
        Runtime_Error_100036 = Runtime + 36,
        Runtime_Error_100037 = Runtime + 37,
        //Runtime_Error_100038 = Runtime + 38,
        Runtime_Error_100039 = Runtime + 39,
        Runtime_Error_100040 = Runtime + 40,
        Runtime_Error_100041 = Runtime + 41,
        Runtime_Error_100042 = Runtime + 42,
        Runtime_Error_100043 = Runtime + 43,
        Runtime_Error_100044 = Runtime + 44,
        Runtime_Error_100045 = Runtime + 45,
        Runtime_Error_100046 = Runtime + 46,
        Runtime_Error_100047 = Runtime + 47,
        Runtime_Error_100048 = Runtime + 48,
        Runtime_Error_100049 = Runtime + 49,
        Runtime_Error_100050 = Runtime + 50,
        Runtime_Error_100051 = Runtime + 51,
        Runtime_Error_100052 = Runtime + 52,
        Runtime_Error_100053 = Runtime + 53,
        Runtime_Error_100054 = Runtime + 54,
        Runtime_Error_100055 = Runtime + 55,
        Runtime_Error_100056 = Runtime + 56,
        Runtime_Error_100057 = Runtime + 57,
        Runtime_Error_100058 = Runtime + 58,
        Runtime_Error_100059 = Runtime + 59,
        Runtime_Error_100060 = Runtime + 60,
        Runtime_Error_100061 = Runtime + 61,
        Runtime_Error_100062 = Runtime + 62,
        Runtime_Error_100063 = Runtime + 63,
        Runtime_Error_100064 = Runtime + 64,
        Runtime_Error_100065 = Runtime + 65,
        Runtime_Error_100066 = Runtime + 66,
        Runtime_Error_100067 = Runtime + 67,
        Runtime_Error_100068 = Runtime + 68,
        Runtime_Error_100069 = Runtime + 69,
        Runtime_Error_100070 = Runtime + 70,
        Runtime_Error_100071 = Runtime + 71,
        Runtime_Error_100072 = Runtime + 72,
        Runtime_Error_100073 = Runtime + 73,
        Runtime_Error_100074 = Runtime + 74,
        Runtime_Error_100075 = Runtime + 75,
        Runtime_Error_100076 = Runtime + 76,
        Runtime_Error_100077 = Runtime + 77,
        Runtime_Error_100078 = Runtime + 78,
        Runtime_Error_100079 = Runtime + 79,
        Runtime_Error_100080 = Runtime + 80,
        Runtime_Error_100081 = Runtime + 81,
        Runtime_Error_100082 = Runtime + 82,
        Runtime_Error_100083 = Runtime + 83,
        Runtime_Error_100084 = Runtime + 84,
        Runtime_Error_100085 = Runtime + 85,
        Runtime_Error_100086 = Runtime + 86,
        Runtime_Error_100087 = Runtime + 87,
        Runtime_Error_100088 = Runtime + 88,
        Runtime_Error_100089 = Runtime + 89,
        Runtime_Error_100090 = Runtime + 90,
        Runtime_Error_100091 = Runtime + 91,
        Runtime_Error_100092 = Runtime + 92,
        Runtime_Error_100093 = Runtime + 93,
        Runtime_Error_100094 = Runtime + 94,
        Runtime_Error_100095 = Runtime + 95,
        Runtime_Error_100096 = Runtime + 96,
        Runtime_Error_100097 = Runtime + 97,
        Runtime_Error_100098 = Runtime + 98,
        Runtime_Error_100099 = Runtime + 99,
        Runtime_Error_100100 = Runtime + 100,
        Runtime_Error_100101 = Runtime + 101,
        Runtime_Error_100102 = Runtime + 102,
        Runtime_Error_100103 = Runtime + 103,
        Runtime_Error_100104 = Runtime + 104,
        Runtime_Error_100105 = Runtime + 105,
        Runtime_Error_100106 = Runtime + 106,
        Runtime_Error_100107 = Runtime + 107,
        Runtime_Error_100108 = Runtime + 108,
        Runtime_Error_100109 = Runtime + 109,
        Runtime_Error_100110 = Runtime + 110,
        Runtime_Error_100111 = Runtime + 111,
        Runtime_Error_100112 = Runtime + 112,
        Runtime_Error_100113 = Runtime + 113,
        Runtime_Error_100114 = Runtime + 114,
        Runtime_Error_100115 = Runtime + 115,
        Runtime_Error_100116 = Runtime + 116,
        Runtime_Error_100117 = Runtime + 117,
        Runtime_Error_100118 = Runtime + 118,
        Runtime_Error_100119 = Runtime + 119,
        Runtime_Error_100120 = Runtime + 120,
        Runtime_Error_100121 = Runtime + 121,
        Runtime_Error_100122 = Runtime + 122,
        Runtime_Error_100123 = Runtime + 123,
        Runtime_Error_100124 = Runtime + 124,
        Runtime_Error_100125 = Runtime + 125,
        Runtime_Error_100126 = Runtime + 126,
        Runtime_Error_100127 = Runtime + 127,
        Runtime_Error_100128 = Runtime + 128,
        Runtime_Error_100129 = Runtime + 129,
        Runtime_Error_100130 = Runtime + 130,
        Runtime_Error_100131 = Runtime + 131,
        Runtime_Error_100132 = Runtime + 132,
        Runtime_Error_100133 = Runtime + 133,
        Runtime_Error_100134 = Runtime + 134,
        Runtime_Error_100135 = Runtime + 135,
        Runtime_Error_100136 = Runtime + 136,
        Runtime_Error_100137 = Runtime + 137,
        Runtime_Error_100138 = Runtime + 138,
        Runtime_Error_100139 = Runtime + 139,
        Runtime_Error_100140 = Runtime + 140,
        Runtime_Error_100141 = Runtime + 141,
        Runtime_Error_100142 = Runtime + 142,
        Runtime_Error_100143 = Runtime + 143,
        Runtime_Error_100144 = Runtime + 144,
        Runtime_Error_100145 = Runtime + 145,
        Runtime_Error_100146 = Runtime + 146,
        Runtime_Error_100147 = Runtime + 147,
        Runtime_Error_100148 = Runtime + 148,
        Runtime_Error_100149 = Runtime + 149,
        Runtime_Error_100150 = Runtime + 150,
        Runtime_Error_100151 = Runtime + 151,
        Runtime_Error_100152 = Runtime + 152,
        Runtime_Error_100153 = Runtime + 153,
        Runtime_Error_100154 = Runtime + 154,
        Runtime_Error_100155 = Runtime + 155,
        Runtime_Error_100156 = Runtime + 156,
        Runtime_Error_100157 = Runtime + 157,
        Runtime_Error_100158 = Runtime + 158,
        Runtime_Error_100159 = Runtime + 159,
        Runtime_Error_100160 = Runtime + 160,
        Runtime_Error_100161 = Runtime + 161,
        Runtime_Error_100162 = Runtime + 162,
        Runtime_Error_100163 = Runtime + 163,
        Runtime_Error_100164 = Runtime + 164,
        Runtime_Error_100165 = Runtime + 165,
        Runtime_Error_100166 = Runtime + 166,
        Runtime_Error_100167 = Runtime + 167,
        Runtime_Error_100168 = Runtime + 168,
        Runtime_Error_100169 = Runtime + 169,
        Runtime_Error_100170 = Runtime + 170,
        Runtime_Error_100171 = Runtime + 171,
        Runtime_Error_100172 = Runtime + 172,
        Runtime_Error_100173 = Runtime + 173,
        Runtime_Error_100174 = Runtime + 174,
        Runtime_Error_100175 = Runtime + 175,
        Runtime_Error_100176 = Runtime + 176,
        Runtime_Error_100177 = Runtime + 177,
        Runtime_Error_100178 = Runtime + 178,
        Runtime_Error_100179 = Runtime + 179,
        Runtime_Error_100180 = Runtime + 180,
        Runtime_Error_100181 = Runtime + 181,
        Runtime_Error_100182 = Runtime + 182,
        Runtime_Error_100183 = Runtime + 183,
        Runtime_Error_100184 = Runtime + 184,
        Runtime_Error_100185 = Runtime + 185,
        Runtime_Error_100186 = Runtime + 186,
        Runtime_Error_100187 = Runtime + 187,
        Runtime_Error_100188 = Runtime + 188,
        Runtime_Error_100189 = Runtime + 189,
        Runtime_Error_100190 = Runtime + 190,
        Runtime_Error_100191 = Runtime + 191,
        Runtime_Error_100192 = Runtime + 192,
        Runtime_Error_100193 = Runtime + 193,
        Runtime_Error_100194 = Runtime + 194,
        Runtime_Error_100195 = Runtime + 195,
        Runtime_Error_100196 = Runtime + 196,
        Runtime_Error_100197 = Runtime + 197,
        Runtime_Error_100198 = Runtime + 198,
        Runtime_Error_100199 = Runtime + 199,
        Runtime_Error_100200 = Runtime + 200,
        Runtime_Error_100201 = Runtime + 201,
        Runtime_Error_100202 = Runtime + 202,
        Runtime_Error_100203 = Runtime + 203,
        Runtime_Error_100204 = Runtime + 204,
        Runtime_Error_100205 = Runtime + 205,
        Runtime_Error_100206 = Runtime + 206,
        Runtime_Error_100207 = Runtime + 207,
        Runtime_Error_100208 = Runtime + 208,
        Runtime_Error_100209 = Runtime + 209,
        Runtime_Error_100210 = Runtime + 210,
        Runtime_Error_100211 = Runtime + 211,
        Runtime_Error_100212 = Runtime + 212,
        Runtime_Error_100213 = Runtime + 213,
        Runtime_Error_100214 = Runtime + 214,
        Runtime_Error_100215 = Runtime + 215,
        Runtime_Error_100216 = Runtime + 216,
        Runtime_Error_100217 = Runtime + 217,
        Runtime_Error_100218 = Runtime + 218,
        Runtime_Error_100219 = Runtime + 219,
        Runtime_Error_100220 = Runtime + 220,
        Runtime_Error_100221 = Runtime + 221,
        Runtime_Error_100222 = Runtime + 222,
        Runtime_Error_100223 = Runtime + 223,
        Runtime_Error_100224 = Runtime + 224,
        Runtime_Error_100225 = Runtime + 225,
        Runtime_Error_100226 = Runtime + 226,
        Runtime_Error_100227 = Runtime + 227,
        Runtime_Error_100228 = Runtime + 228,
        Runtime_Error_100229 = Runtime + 229,
        Runtime_Error_100230 = Runtime + 230,
        Runtime_Error_100231 = Runtime + 231,
        Runtime_Error_100232 = Runtime + 232,
        Runtime_Error_100233 = Runtime + 233,
        Runtime_Error_100234 = Runtime + 234,
        Runtime_Error_100235 = Runtime + 235,
        Runtime_Error_100236 = Runtime + 236,
        Runtime_Error_100237 = Runtime + 237,
        Runtime_Error_100238 = Runtime + 238,
        Runtime_Error_100239 = Runtime + 239,
        Runtime_Error_100240 = Runtime + 240,
        Runtime_Error_100241 = Runtime + 241,
        Runtime_Error_100242 = Runtime + 242,
        Runtime_Error_100243 = Runtime + 243,
        Runtime_Error_100244 = Runtime + 244,
        Runtime_Error_100245 = Runtime + 245,
        Runtime_Error_100246 = Runtime + 246,
        Runtime_Error_100247 = Runtime + 247,
        Runtime_Error_100248 = Runtime + 248,
        Runtime_Error_100249 = Runtime + 249,
        Runtime_Error_100250 = Runtime + 250,
        Runtime_Error_100251 = Runtime + 251,
        Runtime_Error_100252 = Runtime + 252,
        Runtime_Error_100253 = Runtime + 253,
        Runtime_Error_100254 = Runtime + 254,
        Runtime_Error_100255 = Runtime + 255,
        Runtime_Error_100256 = Runtime + 256,
        Runtime_Error_100257 = Runtime + 257,
        Runtime_Error_100258 = Runtime + 258,
        Runtime_Error_100259 = Runtime + 259,
        Runtime_Error_100260 = Runtime + 260,
        Runtime_Error_100261 = Runtime + 261,
        Runtime_Error_100262 = Runtime + 262,
        Runtime_Error_100263 = Runtime + 263,
        Runtime_Error_100264 = Runtime + 264,
        Runtime_Error_100265 = Runtime + 265,
        Runtime_Error_100266 = Runtime + 266,
        Runtime_Error_100267 = Runtime + 267,
        Runtime_Error_100268 = Runtime + 268,
        Runtime_Error_100269 = Runtime + 269,
        Runtime_Error_100270 = Runtime + 270,
        Runtime_Error_100271 = Runtime + 271,
        Runtime_Error_100272 = Runtime + 272,
        Runtime_Error_100273 = Runtime + 273,
        Runtime_Error_100274 = Runtime + 274,
        Runtime_Error_100275 = Runtime + 275,
        Runtime_Error_100276 = Runtime + 276,
        Runtime_Error_100277 = Runtime + 277,
        Runtime_Error_100278 = Runtime + 278,
        Runtime_Error_100279 = Runtime + 279,
        Runtime_Error_100280 = Runtime + 280,
        Runtime_Error_100281 = Runtime + 281,
        Runtime_Error_100282 = Runtime + 282,
        Runtime_Error_100283 = Runtime + 283,
        Runtime_Error_100284 = Runtime + 284,
        Runtime_Error_100285 = Runtime + 285,
        Runtime_Error_100286 = Runtime + 286,
        Runtime_Error_100287 = Runtime + 287,
        Runtime_Error_100288 = Runtime + 288,
        Runtime_Error_100289 = Runtime + 289,
        Runtime_Error_100290 = Runtime + 290,
        Runtime_Error_100291 = Runtime + 291,
        Runtime_Error_100292 = Runtime + 292,
        Runtime_Error_100293 = Runtime + 293,
        Runtime_Error_100294 = Runtime + 294,
        Runtime_Error_100295 = Runtime + 295,
        Runtime_Error_100296 = Runtime + 296,
        Runtime_Error_100297 = Runtime + 297,
        Runtime_Error_100298 = Runtime + 298,
        Runtime_Error_100299 = Runtime + 299,
        Runtime_Error_100300 = Runtime + 300,
        Runtime_Error_100301 = Runtime + 301,
        Runtime_Error_100302 = Runtime + 302,
        Runtime_Error_100303 = Runtime + 303,
        Runtime_Error_100304 = Runtime + 304,
        Runtime_Error_100305 = Runtime + 305,
        Runtime_Error_100306 = Runtime + 306,
        Runtime_Error_100307 = Runtime + 307,
        Runtime_Error_100308 = Runtime + 308,
        Runtime_Error_100309 = Runtime + 309,
        Runtime_Error_100310 = Runtime + 310,
        Runtime_Error_100311 = Runtime + 311,
        Runtime_Error_100312 = Runtime + 312,
        ClientInitializing   = Runtime + 313,
        ClientStarting       = Runtime + 314,
        Runtime_Error_100315 = Runtime + 315,
        Runtime_Error_100316 = Runtime + 316,
        Runtime_Error_100317 = Runtime + 317,
        Runtime_Error_100318 = Runtime + 318,
        Runtime_Error_100319 = Runtime + 319,
        Runtime_Error_100320 = Runtime + 320,
        Runtime_Error_100321 = Runtime + 321,
        GrainInvokeException = Runtime + 322,
        Runtime_Error_100323 = Runtime + 323,
        Runtime_Error_100324 = Runtime + 324,
        Runtime_Error_100325 = Runtime + 325,
        Runtime_Error_100326 = Runtime + 326,
        Runtime_Error_100327 = Runtime + 327,
        Runtime_Error_100328 = Runtime + 328,
        Runtime_Error_100329 = Runtime + 329,
        Runtime_Error_100330 = Runtime + 330,
        Runtime_Error_100331 = Runtime + 331,

        SiloBase                        = Runtime + 400,
        SiloStarting                    = SiloBase + 1,
        SiloStarted                     = SiloBase + 2,
        SiloInitializing                = SiloBase + 3,
        SiloGcSetting                   = SiloBase + 4,
        SiloGcWarning                   = SiloBase + 5,
        SiloSetDeploymentId             = SiloBase + 6,
        SiloSetSiloEndpoint             = SiloBase + 7,
        SiloSetProxyEndpoint            = SiloBase + 8,
        SiloSetSeedNode                 = SiloBase + 9,
        SiloAddSeedNode                 = SiloBase + 10,
        SiloSetPrimaryNode              = SiloBase + 11,
        SiloSetWorkingDir               = SiloBase + 12,
        SiloStopped                     = SiloBase + 13,
        SiloStopping                    = SiloBase + 14,
        SiloInitConfig                  = SiloBase + 15,
        SiloDebugDump                   = SiloBase + 16,
        SiloShuttingDown                = SiloBase + 17,
        SiloShutDown                    = SiloBase + 18,
        SiloFailedToStopMembership      = SiloBase + 19,
        SiloIgnoreErrorDuringStop       = SiloBase + 20,
        SiloHeartbeatTimerStalled       = Runtime_Error_100150, // Backward compatability
        SiloCannotResetHeartbeatTimer   = SiloBase + 21,
        SiloInitializingFinished        = SiloBase + 22,
        SiloSetSiloType                 = SiloBase + 23,
        SiloStartupEventName            = SiloBase + 24,
        SiloStartupEventCreated         = SiloBase + 25,
        SiloStartupEventOpened          = SiloBase + 26,
        SiloStopInProgress              = SiloBase + 27,
        WaitingForSiloStop              = SiloBase + 28,
        CannotCheckRoleEnvironment      = SiloBase + 29,
        SiloConfiguredThreadPool        = SiloBase + 30,
        SiloFailedToConfigureThreadPool = SiloBase + 31,
        SetSiloLivenessType             = SiloBase + 34,
        SiloEndpointConfigError         = SiloBase + 35,
        SiloConfiguredServicePointManager = SiloBase + 36,
        SiloCallingProviderInit         = SiloBase + 37,
        SetReminderServiceType          = SiloBase + 38,
        SiloStartError                  = SiloBase + 39,
        SiloConfigDeprecated            = SiloBase + 40,
        SiloShutdownEventName           = SiloBase + 41,
        SiloShutdownEventCreated        = SiloBase + 42,
        SiloShutdownEventOpened         = SiloBase + 43,
        SiloShutdownEventReceived       = SiloBase + 44,
        SiloLoadedDI                    = SiloBase + 45, // Not used anymore
        SiloFailedToLoadDI              = SiloBase + 46, // Not used anymore
        SiloFileNotFoundLoadingDI       = SiloBase + 47, // Not used anymore

        CatalogBase                     = Runtime + 500,
        CatalogNonExistingActivation1   = CatalogBase + 1,
        Catalog_UnregisterManyAsync     = CatalogBase + 2,
        Catalog_DestroyActivations       = CatalogBase + 3,
        Catalog_UnknownActivation       = CatalogBase + 4,
        Catalog_ActivationException     = CatalogBase + 5,
        Catalog_GetApproximateSiloStatuses = CatalogBase + 6,
        Catalog_BeforeCollection        = CatalogBase + 7,
        Catalog_AfterCollection         = CatalogBase + 8,
        Catalog_ShutdownActivations_1   = CatalogBase + 9,
        CatalogNonExistingActivation2   = CatalogBase + 10,
        Catalog_BeforeCallingActivate   = CatalogBase + 11,
        Catalog_AfterCallingActivate    = CatalogBase + 12,
        Catalog_ErrorCallingActivate    = CatalogBase + 13,
        Catalog_BeforeCallingDeactivate = CatalogBase + 14,
        Catalog_AfterCallingDeactivate  = CatalogBase + 15,
        Catalog_ErrorCallingDeactivate  = CatalogBase + 16,
        Catalog_MissingTypeOnCreate     = CatalogBase + 17,
        Catalog_ResendDuplicateFailed   = CatalogBase + 18,
        Catalog_NullGetTypeAndStrategies= CatalogBase + 19,
        Catalog_DuplicateActivation     = CatalogBase + 20,
        Catalog_RegistrationFailure     = CatalogBase + 21,
        Catalog_Warn_ActivationTooManyRequests          = CatalogBase + 22,
        Catalog_Reject_ActivationTooManyRequests        = CatalogBase + 23,
        Catalog_SiloStatusChangeNotification            = CatalogBase + 24,
        Catalog_SiloStatusChangeNotification_Exception  = CatalogBase + 25,
        Catalog_AttemptToCollectActivationEarly         = CatalogBase + 26,
        Catalog_DeactivateActivation_Exception          = CatalogBase + 27,
        Catalog_ActivationDirectory_Statistics          = CatalogBase + 28,
        Catalog_UnregisterMessageTarget1                = CatalogBase + 29,
        Catalog_UnregisterMessageTarget2                = CatalogBase + 30,
        Catalog_UnregisterMessageTarget3                = CatalogBase + 31,
        Catalog_UnregisterMessageTarget4                = CatalogBase + 32,
        Catalog_Failed_SetupActivationState             = CatalogBase + 33,
        Catalog_Failed_InvokeActivate                   = CatalogBase + 34,
        Catalog_RerouteAllQueuedMessages                = CatalogBase + 35,
        Catalog_WaitForAllTimersToFinish_Exception      = CatalogBase + 36,
        Catalog_ActivationCollector_BadState_1          = CatalogBase + 37,
        Catalog_ActivationCollector_BadState_2          = CatalogBase + 38,
        Catalog_DestroyActivations_Done                 = CatalogBase + 39,
        Catalog_ShutdownActivations_2                   = CatalogBase + 40,
        Catalog_ShutdownActivations_3                   = CatalogBase + 41,
        Catalog_DeactivateStreamResources_Exception     = CatalogBase + 42,
        Catalog_FinishDeactivateActivation_Exception    = CatalogBase + 43,
        Catalog_FinishGrainDeactivateAndCleanupStreams_Exception = CatalogBase + 44,
        Catalog_DeactivateAllActivations                = CatalogBase + 45,
        Catalog_ActivationCollector_BadState_3          = CatalogBase + 46,

        MembershipBase                         = Runtime + 600,
        MembershipCantWriteLivenessDisabled    = Runtime_Error_100225, // Backward compatability
        MembershipNodeMigrated                 = MembershipBase + 1,
        MembershipNodeRestarted                = MembershipBase + 2,
        MembershipStarting                     = MembershipBase + 3,
        MembershipBecomeActive                 = MembershipBase + 4,
        MembershipFinishBecomeActive           = MembershipBase + 5,
        MembershipShutDown                     = MembershipBase + 6,
        MembershipStop                         = MembershipBase + 7,
        MembershipReadTable                    = MembershipBase + 8,
        MembershipKillMyself                   = MembershipBase + 9,
        MembershipVotingForKill                = MembershipBase + 10,
        MembershipMarkingAsDead                = MembershipBase + 11,
        MembershipWatchList                    = MembershipBase + 12,
        MembershipMissedPing                   = MembershipBase + 13,
        MembershipSendingPreJoinPing           = MembershipBase + 14,
        MembershipFailedToWrite                = MembershipBase + 15,
        MembershipFailedToWriteConditional     = MembershipBase + 16,
        MembershipFoundMyselfDead1             = MembershipBase + 17,
        MembershipFoundMyselfDead2             = MembershipBase + 18,
        MembershipDetectedOlder                = MembershipBase + 19,
        MembershipDetectedNewer                = MembershipBase + 20,
        MembershipDelayedTableUpdateTimer      = MembershipBase + 21,
        MembershipDelayedProbeOtherSilosTimer  = MembershipBase + 22,
        MembershipFailedToReadSilo             = MembershipBase + 23,
        MembershipDelayedIAmAliveUpdateTimer   = MembershipBase + 24,
        MembershipMissedIAmAliveTableUpdate    = MembershipBase + 25,
        MembershipLocalSubscriberException     = MembershipBase + 26,
        MembershipKillMyselfLocally            = MembershipBase + 27,
        MembershipFoundMyselfDead3             = MembershipBase + 28,
        MembershipMarkDeadWriteFailed          = MembershipBase + 29,
        MembershipTableGrainInit1              = MembershipBase + 30,
        MembershipTableGrainInit2              = MembershipBase + 31,
        MembershipTableGrainInit3              = MembershipBase + 32,
        MembershipTableGrainInit4              = MembershipBase + 33,
        MembershipReadAll_1                    = MembershipBase + 34,
        MembershipFactory1                     = MembershipBase + 35,
        MembershipFactory2                     = MembershipBase + 36,
        MembershipGrainBasedTable1             = MembershipBase + 37,
        MembershipGrainBasedTable2             = MembershipBase + 38,
        MembershipGrainBasedTable3             = MembershipBase + 39,
        MembershipFileBasedTable1              = MembershipBase + 40,
        MembershipFileBasedTable2              = MembershipBase + 41,
        MembershipFileBasedTable3              = MembershipBase + 42,
        MembershipFileBasedTable4              = MembershipBase + 43,
        MembershipPingedSiloNotInWatchList     = MembershipBase + 44,
        MembershipReadAll_2                    = MembershipBase + 45,
        MembershipFailedToStart                = MembershipBase + 46,
        MembershipFailedToBecomeActive         = MembershipBase + 47,
        MembershipFailedToStop                 = MembershipBase + 48,
        MembershipFailedToShutdown             = MembershipBase + 49,
        MembershipFailedToKillMyself           = MembershipBase + 50,
        MembershipFailedToSuspect              = MembershipBase + 51,
        MembershipReadAll_Cleanup              = MembershipBase + 52,
        MembershipShutDownFailure              = MembershipBase + 53,
        MembershipKillMyselfFailure            = MembershipBase + 54,
        MembershipGossipProcessingFailure      = MembershipBase + 55,
        MembershipGossipSendFailure            = MembershipBase + 56,
        MembershipTimerProcessingFailure       = MembershipBase + 57,
        MembershipSendPingFailure              = MembershipBase + 58,
        MembershipUpdateIAmAliveFailure        = MembershipBase + 59,
        MembershipStartingIAmAliveTimer        = MembershipBase + 60,
        MembershipJoiningPreconditionFailure   = MembershipBase + 61,

        NSMembershipStarting                   = MembershipBase + 70,
        NSMembershipBecomeActive               = MembershipBase + 71,
        NSMembershipFailedToBecomeActive       = MembershipBase + 72,
        NSMembershipShutDown                   = MembershipBase + 73,
        NSMembershipStop                       = MembershipBase + 74,
        NSMembershipKillMyself                 = MembershipBase + 75,
        NSMembershipKillMyselfLocally          = MembershipBase + 76,
        NSMembershipNotificationProcessingFailure = MembershipBase + 77,
        NSMembershipReadAll_1                  = MembershipBase + 78,
        NSMembershipReadAll_2                  = MembershipBase + 79,
        NSMembershipFoundMyselfDead2           = MembershipBase + 80,
        NSMembershipDetectedOlder              = MembershipBase + 81,
        NSMembershipDetectedNewer              = MembershipBase + 82,
        NSMembershipTimerProcessingFailure     = MembershipBase + 83,
        NSMembershipShutDownFailure            = MembershipBase + 84,
        NSMembershipKillMyselfFailure          = MembershipBase + 85,
        NSMembershipNSDetails                  = MembershipBase + 86,
        SSMT_ReadRowError                      = MembershipBase + 87,
        SSMT_ReadAllError                      = MembershipBase + 88,
        SSMT_InsertRowError                    = MembershipBase + 89,
        SSMT_UpdateRowError                    = MembershipBase + 90,
        SSMT_MergeRowError                     = MembershipBase + 91,
        SSMT_EtagMismatch_Insert               = MembershipBase + 92,
        SSMT_EtagMismatch_Update               = MembershipBase + 93,

        PerfCounterBase                 = Runtime + 700,
        PerfCounterNotFound             = PerfCounterBase + 1,
        PerfCounterStarting             = PerfCounterBase + 2,
        PerfCounterStopping             = PerfCounterBase + 3,
        PerfCounterDumpAll              = PerfCounterBase + 4,
        PerfCounterWriteErrors          = PerfCounterBase + 5,
        PerfCounterWriteSuccess         = PerfCounterBase + 6,
        PerfCounterWriteTooManyErrors   = PerfCounterBase + 7,
        PerfCounterNotRegistered        = PerfCounterBase + 8,
        PerfCounterUnableToConnect      = PerfCounterBase + 9,
        PerfCounterUnableToWrite        = PerfCounterBase + 10,
        PerfCounterWriting              = PerfCounterBase + 11,
        PerfCounterSkipping             = PerfCounterBase + 12,
        PerfMetricsStoppingTimer        = PerfCounterBase + 13,
        PerfMetricsStartingTimer        = PerfCounterBase + 14,
        PerfStatistics                  = PerfCounterBase + 15,
        PerfCounterRegistering          = PerfCounterBase + 16,
        PerfCounterTimerError           = PerfCounterBase + 17,
        PerfCounterCategoryCheckError   = PerfCounterBase + 18,
        PerfCounterConnectError         = PerfCounterBase + 19,
        PerfCounterFailedToInitialize   = PerfCounterBase + 20,
        
        AzureTableBase = Runtime + 800,
        AzureTable_01 = AzureTableBase + 1,
        AzureTable_02 = AzureTableBase + 2,
        AzureTable_03 = AzureTableBase + 3,
        AzureTable_04 = AzureTableBase + 4,
        AzureTable_05 = AzureTableBase + 5,
        AzureTable_06 = AzureTableBase + 6,
        AzureTable_07 = AzureTableBase + 7,
        AzureTable_08 = AzureTableBase + 8,
        AzureTable_09 = AzureTableBase + 9,
        AzureTable_10 = AzureTableBase + 10,
        AzureTable_11 = AzureTableBase + 11,
        AzureTable_12 = AzureTableBase + 12,
        AzureTable_13 = AzureTableBase + 13,
        AzureTable_14 = AzureTableBase + 14,
        AzureTable_15 = AzureTableBase + 15,
        AzureTable_16 = AzureTableBase + 16,
        AzureTable_17 = AzureTableBase + 17,
        AzureTable_18 = AzureTableBase + 18,
        AzureTable_19 = AzureTableBase + 19,
        AzureTable_20 = AzureTableBase + 20,
        AzureTable_21 = AzureTableBase + 21,
        AzureTable_22 = AzureTableBase + 22,
        AzureTable_23 = AzureTableBase + 23,
        AzureTable_24 = AzureTableBase + 24,
        AzureTable_25 = AzureTableBase + 25,
        AzureTable_26 = AzureTableBase + 26,
        AzureTable_27 = AzureTableBase + 27,
        AzureTable_28 = AzureTableBase + 28,
        AzureTable_29 = AzureTableBase + 29,
        AzureTable_30 = AzureTableBase + 30,
        AzureTable_31 = AzureTableBase + 31,
        AzureTable_32 = AzureTableBase + 32,
        AzureTable_33 = AzureTableBase + 33,
        AzureTable_34 = AzureTableBase + 34,
        AzureTable_35 = AzureTableBase + 35,
        AzureTable_36 = AzureTableBase + 36,
        AzureTable_37 = AzureTableBase + 37,
        // reminders related
        AzureTable_38 = AzureTableBase + 38,
        AzureTable_39 = AzureTableBase + 39,
        AzureTable_40 = AzureTableBase + 40,
        AzureTable_41 = AzureTableBase + 41,
        AzureTable_42 = AzureTableBase + 42,
        AzureTable_43 = AzureTableBase + 43,
        AzureTable_44 = AzureTableBase + 44,
        AzureTable_45 = AzureTableBase + 45,
        AzureTable_46 = AzureTableBase + 46,
        AzureTable_47 = AzureTableBase + 47,
        AzureTable_48 = AzureTableBase + 48,
        AzureTable_49 = AzureTableBase + 49,
        // Azure storage provider related
        AzureTable_DataNotFound                     = AzureTableBase + 50,
        AzureTable_ReadingData                      = AzureTableBase + 51,
        AzureTable_WritingData                      = AzureTableBase + 52,
        AzureTable_Storage_Reading                  = AzureTableBase + 53,
        AzureTable_Storage_Writing                  = AzureTableBase + 54,
        AzureTable_Storage_DataRead                 = AzureTableBase + 55,
        AzureTable_WriteError                       = AzureTableBase + 56,
        AzureTable_DeleteError                      = AzureTableBase + 57,
        AzureTable_InitProvider                     = AzureTableBase + 58,
        AzureTable_ParamConnectionString            = AzureTableBase + 59,
        AzureTable_60                               = AzureTableBase + 60,
        AzureTable_61                               = AzureTableBase + 61,
        AzureTable_62                               = AzureTableBase + 62,
        AzureTableStorage_InitProvider              = AzureTableBase + 63,
        AzureTable_ReadWrongReminder                = AzureTableBase + 64,
        
        ProxyClientBase                             = Runtime + 900,
        ProxyClient_ReceiveError                    = Runtime_Error_100021, // Backward compatability
        ProxyClient_SerializationError              = Runtime_Error_100159, // Backward compatability
        ProxyClient_SocketSendError                 = Runtime_Error_100161, // Backward compatability
        ProxyClient_ByteCountMismatch               = Runtime_Error_100163, // Backward compatability
        ProxyClient_CannotConnect                   = Runtime_Error_100178, // Backward compatability
        ProxyClientUnhandledExceptionWhileSending   = ProxyClientBase + 1,
        ProxyClientUnhandledExceptionWhileReceiving = ProxyClientBase + 2,
        ProxyClient_CannotSend                      = ProxyClientBase + 3,
        ProxyClient_CannotSend_NoGateway            = ProxyClientBase + 4,
        ProxyClient_DroppingMsg                     = ProxyClientBase + 5,
        ProxyClient_RejectingMsg                    = ProxyClientBase + 6,
        ProxyClient_MsgSent                         = ProxyClientBase + 7,
        ProxyClient_Connected                       = ProxyClientBase + 8,
        ProxyClient_PauseBeforeRetry                = ProxyClientBase + 9,
        ProxyClient_MsgCtrNotRunning                = ProxyClientBase + 10,
        ProxyClient_DeadGateway                     = ProxyClientBase + 11,
        ProxyClient_MarkGatewayDead                 = ProxyClientBase + 12,
        ProxyClient_MarkGatewayDisconnected         = ProxyClientBase + 13,
        ProxyClient_GatewayConnStarted              = ProxyClientBase + 14,
        ProxyClient_CreatedGatewayUnordered              = ProxyClientBase + 15,
        ProxyClient_CreatedGatewayToGrain                = ProxyClientBase + 16,
        ProxyClient_NewBucketIndex                  = ProxyClientBase + 17,
        ProxyClient_QueueRequest                    = ProxyClientBase + 18,
        ProxyClient_ThreadAbort                     = ProxyClientBase + 19,
        ProxyClient_OperationCancelled              = ProxyClientBase + 20,
        ProxyClient_GetGateways                     = ProxyClientBase + 21,
        ProxyClient_NetworkError                    = ProxyClientBase + 22,
        ProxyClient_SendException                   = ProxyClientBase + 23,
        ProxyClient_OGC_TargetNotFound              = ProxyClientBase + 24,
        ProxyClient_OGC_SendResponseFailed          = ProxyClientBase + 25,
        ProxyClient_OGC_SendExceptionResponseFailed = ProxyClientBase + 26,
        ProxyClient_OGC_UnhandledExceptionInOneWayInvoke = ProxyClientBase + 27,
        ProxyClient_ClientInvokeCallback_Error      = ProxyClientBase + 28,
        ProxyClient_StartDone                       = ProxyClientBase + 29,
        ProxyClient_OGC_TargetNotFound_2            = ProxyClientBase + 30,
        ProxyClient_AppDomain_Unload                = ProxyClientBase + 31,

        MessagingBase                           = Runtime + 1000,
        Messaging_IMA_DroppingConnection        = MessagingBase + 1,
        Messaging_Dispatcher_DiscardRejection   = MessagingBase + 2,
        MessagingBeginReceiveException          = MessagingBase + 3,
        MessagingBeginAcceptSocketException     = MessagingBase + 4,
        MessagingAcceptingSocketClosed          = MessagingBase + 5,
        MessagingEndAcceptSocketException       = MessagingBase + 6,
        MessagingUnexpectedSendError            = MessagingBase + 7,
        MessagingSendingRejection               = MessagingBase + 8,
        MessagingMessageFromUnknownActivation   = MessagingBase + 9,
        Messaging_IMA_OpenedListeningSocket     = MessagingBase + 10,
        Messaging_IMA_AcceptCallbackNullState   = MessagingBase + 11,
        Messaging_IMA_AcceptCallbackUnexpectedState  = MessagingBase + 12,
        Messaging_IMA_NewBeginReceiveException  = MessagingBase + 13,
        Messaging_Socket_ReceiveError           = MessagingBase + 14,
        Messaging_IMA_ClosingSocket             = MessagingBase + 15,
        Messaging_OutgoingMS_DroppingMessage    = MessagingBase + 16,
        MessagingProcessReceiveBufferException  = MessagingBase + 17,
        Messaging_LargeMsg_Outgoing             = MessagingBase + 18,
        Messaging_LargeMsg_Incoming             = MessagingBase + 19,
        Messaging_SiloNetworkError              = MessagingBase + 20,
        Messaging_UnableToGetSendingSocket      = MessagingBase + 21,
        Messaging_ExceptionSending              = MessagingBase + 22,
        Messaging_CountMismatchSending          = MessagingBase + 23,
        Messaging_ExceptionReceiving            = MessagingBase + 24,
        Messaging_ExceptionBeginReceiving       = MessagingBase + 25,
        Messaging_IMA_ExceptionAccepting        = MessagingBase + 26,
        Messaging_IMA_BadBufferReceived         = MessagingBase + 27,
        Messaging_IMA_ActivationOverloaded      = MessagingBase + 28,
        Messaging_Gateway_SerializationError    = MessagingBase + 29,
        Messaging_UnableToDeserializeBody       = MessagingBase + 30,
        Messaging_Dispatcher_TryForward         = MessagingBase + 31,
        Messaging_Dispatcher_TryForwardFailed   = MessagingBase + 32,
        Messaging_Dispatcher_ForwardingRequests = MessagingBase + 33,
        Messaging_SimulatedMessageLoss          = MessagingBase + 34,
        Messaging_Dispatcher_ReturnToOriginCluster    = MessagingBase + 35,

        DirectoryBase                           = Runtime + 1100,
        DirectoryBothPrimaryAndBackupForGrain   = DirectoryBase + 1,
        DirectoryPartitionPredecessorExpected   = DirectoryBase + 2,
        DirectoryUnexpectedDelta                = DirectoryBase + 4,
        Directory_SiloStatusChangeNotification_Exception = DirectoryBase + 5,

        SchedulerBase                           = Runtime + 1200,
        SchedulerWorkerPoolThreadQueueWaitTime  = SchedulerBase + 1,
        SchedulerWorkItemGroupQueueWaitTime     = SchedulerBase + 2,
        SchedulerStatistics                     = SchedulerBase + 3,
        SchedulerFinishShutdown                 = SchedulerBase + 4,
        SchedulerNullActivation                 = SchedulerBase + 5,
        SchedulerExceptionFromExecute           = SchedulerBase + 6,
        SchedulerNullContext                    = SchedulerBase + 7,
        SchedulerTaskExecuteIncomplete1         = SchedulerBase + 8,
        WaitCalledInsideGrain                   = SchedulerBase + 9,
        SchedulerStatus                         = SchedulerBase + 10,
        WaitCalledInServerCode                  = SchedulerBase + 11,
        SchedulerTurnTooLong                    = SchedulerBase + 12,
        SchedulerTooManyPendingItems            = SchedulerBase + 13,
        SchedulerTurnTooLong2                   = SchedulerBase + 14,
        SchedulerTurnTooLong3                   = SchedulerBase + 15,
        SchedulerWorkGroupShuttingDown          = SchedulerBase + 16,
        SchedulerNotEnqueuWorkWhenShutdown      = SchedulerBase + 17,
        SchedulerNotExecuteWhenShutdown         = SchedulerBase + 18,
        SchedulerAppTurnsStopped_1              = SchedulerBase + 19,
        SchedulerWorkGroupStopping              = SchedulerBase + 20,
        SchedulerSkipWorkStopping               = SchedulerBase + 21,
        SchedulerSkipWorkCancelled              = SchedulerBase + 22,
        SchedulerTaskRunningOnWrongScheduler1   = SchedulerBase + 23,
        SchedulerQueueWorkItemWrongCall         = SchedulerBase + 24,
        SchedulerQueueTaskWrongCall             = SchedulerBase + 25,
        SchedulerTaskExecuteIncomplete2         = SchedulerBase + 26,
        SchedulerTaskExecuteIncomplete3         = SchedulerBase + 27,
        SchedulerTaskExecuteIncomplete4         = SchedulerBase + 28,
        SchedulerTaskWaitIncomplete             = SchedulerBase + 29,
        SchedulerWorkerThreadExc                = SchedulerBase + 30,
        SchedulerQueueWorkItemWrongContext      = SchedulerBase + 31,
        SchedulerAppTurnsStopped_2              = SchedulerBase + 32,

        GatewayBase                             = Runtime + 1300,
        GatewayClientOpenedSocket               = GatewayBase + 1,
        GatewayClientClosedSocket               = GatewayBase + 2,
        GatewayDroppingClient                   = GatewayBase + 3,
        GatewayTryingToSendToUnrecognizedClient = GatewayBase + 4,
        GatewayByteCountMismatch                = GatewayBase + 5,
        GatewayExceptionSendingToClient         = GatewayBase + 6,
        GatewayAcceptor_SocketClosed            = GatewayBase + 7,
        GatewayAcceptor_ExceptionReceiving      = GatewayBase + 8,
        GatewayManager_FoundKnownGateways       = GatewayBase + 9,
        MessageAcceptor_Connection              = GatewayBase + 10,
        MessageAcceptor_NotAProxiedConnection   = GatewayBase + 11,
        MessageAcceptor_UnexpectedProxiedConnection = GatewayBase + 12,
        GatewayManager_NoGateways               = GatewayBase + 13,
        GatewayNetworkError                     = GatewayBase + 14,
        GatewayFailedToParse                    = GatewayBase + 15,
        ClientRegistrarFailedToRegister         = GatewayBase + 16,
        ClientRegistrarFailedToRegister_2       = GatewayBase + 17,
        ClientRegistrarFailedToUnregister       = GatewayBase + 18,
        ClientRegistrarTimerFailed              = GatewayBase + 19,
        GatewayAcceptor_WrongClusterId          = GatewayBase + 20,

        TimerBase                               = Runtime + 1400,
        TimerChangeError                        = PerfCounterTimerError, // Backward compatability
        //TimerCallbackError                    = Runtime_Error_100306, // Backward compatability
        TimerCallbackError                      = Runtime_Error_100037, // Backward compatability
        TimerDisposeError                       = TimerBase + 1,
        TimerStopError                          = TimerBase + 2,
        TimerQueueTickError                     = TimerBase + 3,
        TimerChanging                           = TimerBase + 4,
        TimerBeforeCallback                     = TimerBase + 5,
        TimerAfterCallback                      = TimerBase + 6,
        TimerNextTick                           = TimerBase + 7,
        TimerDisposing                          = TimerBase + 8,
        TimerStopped                            = TimerBase + 9,
        Timer_TimerInsideGrainIsNotTicking      = TimerBase + 10,
        Timer_TimerInsideGrainIsDelayed         = TimerBase + 11,
        Timer_SafeTimerIsNotTicking             = TimerBase + 12,
        Timer_GrainTimerCallbackError           = TimerBase + 13,
        Timer_InvalidContext                    = TimerBase + 14,

        DispatcherBase                          = Runtime + 1500,
        Dispatcher_SelectTarget_Failed          = Runtime_Error_100071, // Backward compatability
        Dispatcher_InvalidEnum_Direction        = Runtime_Error_100072, // Backward compatability
        Dispatcher_NoCallbackForRejectionResp   = Runtime_Error_100073, // Backward compatability
        Dispatcher_InvalidEnum_RejectionType    = Runtime_Error_100075, // Backward compatability
        Dispatcher_NoCallbackForResp            = Runtime_Error_100076, // Backward compatability
        Dispatcher_InvalidMsg_Direction         = Runtime_Error_100077, // Backward compatability
        Dispatcher_Intermediate_GetOrCreateActivation = Runtime_Error_100147, // Backward compatability
        Dispatcher_NoTargetActivation           = Runtime_Error_100148, // Backward compatability
        Dispatcher_QueueingRequestBadTargetState = Runtime_Error_100152, // Backward compatability
        Dispatcher_InjectingRejection           = Runtime_Error_100299, // Backward compatability
        Dispatcher_InjectingMessageLoss         = Runtime_Error_100300, // Backward compatability
        Dispatcher_UnknownTypeCode = Runtime_Error_100303, // Backward compatability
        Dispatcher_SelectTarget_FailPending     = DispatcherBase + 1,
        Dispatcher_RegisterCallback_Replaced    = DispatcherBase + 2,
        Dispatcher_Send_BufferResponse          = DispatcherBase + 3,
        Dispatcher_Send_AddressedMessage        = DispatcherBase + 4,
        Dispatcher_Receive_InvalidActivation    = DispatcherBase + 5,
        Dispatcher_WriteGrainFailed             = DispatcherBase + 6,
        Dispatcher_ActivationEndedTurn_Waiting  = DispatcherBase + 7,
        Dispatcher_Retarget                     = DispatcherBase + 8,
        Dispatcher_TryAcceptMessage             = DispatcherBase + 9,
        Dispatcher_UpdateReceiveOrder           = DispatcherBase + 10,
        Dispatcher_ReceiveOrderCorrelation      = DispatcherBase + 11,
        Dispatcher_AddSendOrder                 = DispatcherBase + 12,
        Dispatcher_AddSendOrderNoPrior          = DispatcherBase + 13,
        Dispatcher_AddSendOrder_PriorIds        = DispatcherBase + 14,
        Dispatcher_AddSendOrder_First           = DispatcherBase + 15,
        Dispatcher_EnqueueMessage               = DispatcherBase + 16,
        Dispatcher_AddressMsg                   = DispatcherBase + 17,
        Dispatcher_AddressMsg_GrainOrder        = DispatcherBase + 18,
        Dispatcher_AddressMsg_NullingLastSentTo = DispatcherBase + 19,
        Dispatcher_AddressMsg_SMPlacement       = DispatcherBase + 20,
        Dispatcher_AddressMsg_UnregisteredClient = DispatcherBase + 21,
        Dispatcher_AddressMsg_SelectTarget      = DispatcherBase + 22,
        Dispatcher_HandleMsg                    = DispatcherBase + 23,
        Dispatcher_OnActivationCompletedRequest_Waiting = DispatcherBase + 24,
        IGC_DisposeError                        = DispatcherBase + 25,
        IGC_SendRequest_NullContext             = DispatcherBase + 26,
        IGC_SniffIncomingMessage_Exc            = DispatcherBase + 27,
        Dispatcher_DetectedDeadlock             = DispatcherBase + 28,
        Dispatcher_DroppingExpiredMessage       = DispatcherBase + 29,
        Dispatcher_ActivationOverloaded         = DispatcherBase + 30,
        IGC_SendResponseFailed                  = DispatcherBase + 31,
        IGC_SendExceptionResponseFailed         = DispatcherBase + 32,
        IGC_UnhandledExceptionInInvoke          = DispatcherBase + 33,
        Dispatcher_ExtendedMessageProcessing    = DispatcherBase + 34,
        Dispatcher_FailedToUnregisterNonExistingAct = DispatcherBase + 35,
        Dispatcher_NoGrainInstance              = DispatcherBase + 36,
        Dispatcher_RuntimeStatisticsUnavailable = DispatcherBase + 37,
        Dispatcher_InvalidActivation            = DispatcherBase + 38,
        InvokeWorkItem_UnhandledExceptionInInvoke = DispatcherBase + 39,
        Dispatcher_ErrorCreatingActivation      = DispatcherBase + 40,

        SerializationBase                       = Runtime + 1600,
        Ser_IncompatibleIntermediateType        = Runtime_Error_100033, // Backward compatability
        Ser_CannotConstructBaseObj              = Runtime_Error_100034, // Backward compatability
        Ser_IncompatibleType                    = Runtime_Error_100035, // Backward compatability
        Ser_AssemblyLoadError                   = SerializationBase + 1,
        Ser_BadRegisterSerializer               = SerializationBase + 2,
        Ser_AssemblyLoadErrorDetails            = SerializationBase + 3,
        Ser_AssemblyLoadSuccess                 = SerializationBase + 4,
        Ser_LargeObjectAllocated                = SerializationBase + 5,

        LoaderBase                              = Runtime + 1700,
        Loader_NotGrainAssembly                 = Runtime_Error_100047, // Backward compatability
        Loader_TypeLoadError                    = Runtime_Error_100048, // Backward compatability
        Loader_ProxyLoadError                   = Runtime_Error_100049, // Backward compatability
        Loader_AssemblyLookupFailed             = LoaderBase + 1,
        Loader_AssemblyLookupResolved           = LoaderBase + 2,
        Loader_LoadingFromDir                   = LoaderBase + 3,
        Loader_LoadingFromFile                  = LoaderBase + 4,
        Loader_DirNotFound                      = LoaderBase + 5,
        Loader_LoadingSerInfo                   = LoaderBase + 6,
        Loader_LoadingGrainType                 = LoaderBase + 7,
        Loader_SkippingFile                     = LoaderBase + 8,
        Loader_SkippingDynamicAssembly          = LoaderBase + 9,
        Loader_AssemblyInspectError             = LoaderBase + 10,
        Loader_GrainTypeFullList                = LoaderBase + 11,
        Loader_IgnoreAbstractGrainClass         = LoaderBase + 12,
        Loader_AssemblyInspectionError          = LoaderBase + 13,
        Loader_FoundBinary                      = LoaderBase + 14,
        Loader_IgnoreNonPublicGrainClass        = LoaderBase + 15,
        Loader_UnexpectedException              = LoaderBase + 16,
        Loader_SkippingBadAssembly              = LoaderBase + 17,
        Loader_TypeLoadError_2                  = LoaderBase + 18,
        Loader_TypeLoadError_3                  = LoaderBase + 19,
        Loader_TypeLoadError_4                  = LoaderBase + 20,
        Loader_LoadAndCreateInstance_Failure    = LoaderBase + 21,
        Loader_TryLoadAndCreateInstance_Failure = LoaderBase + 22,
        Loader_TypeLoadError_5                  = LoaderBase + 23,

        PlacementBase                               = Runtime + 1800,
        Placement_RuntimeStatisticsUpdateFailure_1  = PlacementBase + 1,
        Placement_RuntimeStatisticsUpdateFailure_2  = PlacementBase + 2,
        Placement_RuntimeStatisticsUpdateFailure_3  = PlacementBase + 3,
        Placement_ActivationCountBasedDirector_NoSilos = PlacementBase + 4,

        StorageProviderBase                     = Runtime + 2200,
        StorageProvider_ReadFailed              = StorageProviderBase + 2,
        StorageProvider_WriteFailed             = StorageProviderBase + 3,
        StorageProvider_DeleteFailed            = StorageProviderBase + 4,
        StorageProvider_ForceReRead             = StorageProviderBase + 5,

        SerializationManagerBase                = Runtime + 2400,
        SerMgr_TypeRegistrationFailure          = SerializationManagerBase + 1,
        SerMgr_MissingRegisterMethod            = SerializationManagerBase + 2,
        SerMgr_ErrorBindingMethods              = SerializationManagerBase + 3,
        SerMgr_ErrorLoadingAssemblyTypes        = SerializationManagerBase + 4,
        SerMgr_TooLongSerialize                 = SerializationManagerBase + 5,
        SerMgr_TooLongDeserialize               = SerializationManagerBase + 6,
        SerMgr_TooLongDeepCopy                  = SerializationManagerBase + 7,
        SerMgr_IgnoreAssembly                   = SerializationManagerBase + 8,
        SerMgr_TypeRegistrationFailureIgnore    = SerializationManagerBase + 9,
        SerMgr_ArtifactReport                   = SerializationManagerBase + 10,
        SerMgr_UnavailableSerializer            = SerializationManagerBase + 11,

        WatchdogBase                            = Runtime + 2600,
        Watchdog_ParticipantThrownException     = WatchdogBase + 1,
        Watchdog_InternalError                  = WatchdogBase + 2,
        Watchdog_HealthCheckFailure             = WatchdogBase + 3,

        LoggerBase                              = Runtime + 2700,
        Logger_MiniDumpCreated                  = Runtime_Error_100001, // Backward compatability
        Logger_ProcessCrashing                  = Runtime_Error_100002, // Backward compatability
        Logger_LogMessageTruncated              = LoggerBase + 1,

        WFServiceBase                           = Runtime + 2800,
        WFService_Error_1                       = WFServiceBase + 1,
        WFService_Error_2                       = WFServiceBase + 2,
        WFService_Error_3                       = WFServiceBase + 3,
        WFService_Error_4                       = WFServiceBase + 4,
        WFService_Error_5                       = WFServiceBase + 5,
        WFService_Error_6                       = WFServiceBase + 6,
        WFService_Error_7                       = WFServiceBase + 7,
        WFService_Error_8                       = WFServiceBase + 8,
        WFService_Error_9                       = WFServiceBase + 9,

        // Codes for the Reminder Service
        ReminderServiceBase                     = Runtime + 2900,
        RS_Register_TableError                  = ReminderServiceBase + 5,
        RS_Register_AlreadyRegistered           = ReminderServiceBase + 7,
        RS_Register_InvalidPeriod               = ReminderServiceBase + 8,
        RS_Register_NotRemindable               = ReminderServiceBase + 9,
        RS_NotResponsible                       = ReminderServiceBase + 10,
        RS_Unregister_NotFoundLocally           = ReminderServiceBase + 11,
        RS_Unregister_TableError                = ReminderServiceBase + 12,
        RS_Table_Insert                         = ReminderServiceBase + 13,
        RS_Table_Remove                         = ReminderServiceBase + 14,
        RS_Tick_Delivery_Error                  = ReminderServiceBase + 15,
        RS_Not_Started                          = ReminderServiceBase + 16,
        RS_UnregisterGrain_TableError           = ReminderServiceBase + 17,
        RS_GrainBasedTable1                     = ReminderServiceBase + 18,
        RS_Factory1                             = ReminderServiceBase + 19,
        RS_FailedToReadTableAndStartTimer       = ReminderServiceBase + 20,
        RS_TableGrainInit1                      = ReminderServiceBase + 21,
        RS_TableGrainInit2                      = ReminderServiceBase + 22,
        RS_TableGrainInit3                      = ReminderServiceBase + 23,
        RS_GrainBasedTable2                     = ReminderServiceBase + 24,
        RS_ServiceStarting                      = ReminderServiceBase + 25,
        RS_ServiceStarted                       = ReminderServiceBase + 26,
        RS_ServiceStopping                      = ReminderServiceBase + 27,
        RS_RegisterOrUpdate                     = ReminderServiceBase + 28,
        RS_Unregister                           = ReminderServiceBase + 29,
        RS_Stop                                 = ReminderServiceBase + 30,
        RS_RemoveFromTable                      = ReminderServiceBase + 31,
        RS_GetReminder                          = ReminderServiceBase + 32,
        RS_GetReminders                         = ReminderServiceBase + 33,
        RS_RangeChanged                         = ReminderServiceBase + 34,
        RS_LocalStop                            = ReminderServiceBase + 35,
        RS_Started                              = ReminderServiceBase + 36,
        RS_ServiceInitialLoadFailing            = ReminderServiceBase + 37,
        RS_ServiceInitialLoadFailed             = ReminderServiceBase + 38,

        
        // Codes for the Consistent Ring Provider
        ConsistentRingProviderBase                  = Runtime + 3000,
        CRP_Local_Subscriber_Exception              = ConsistentRingProviderBase + 1,
        CRP_ForGrains_Local_Subscriber_Exception_1  = ConsistentRingProviderBase + 2,
        CRP_Added_Silo                              = ConsistentRingProviderBase + 3,
        CRP_Removed_Silo                            = ConsistentRingProviderBase + 4,
        CRP_Notify                                  = ConsistentRingProviderBase + 5,
        CRP_ForGrains_Local_Subscriber_Exception_2  = ConsistentRingProviderBase + 6,

        ProviderManagerBase                     = Runtime + 3100,
        Provider_InstanceConstructionError1     = ProviderManagerBase + 1,
        Provider_Loaded                         = ProviderManagerBase + 2,
        Provider_AssemblyLoadError              = ProviderManagerBase + 3,
        Provider_CatalogNoStorageProvider_1     = ProviderManagerBase + 4,
        Provider_CatalogNoStorageProvider_2     = ProviderManagerBase + 5,
        Provider_CatalogStorageProviderAllocated = ProviderManagerBase + 6,
        Provider_NoDefaultProvider              = ProviderManagerBase + 7,
        Provider_ConfiguredProviderNotLoaded    = ProviderManagerBase + 8,
        Provider_ErrorFromInit                  = ProviderManagerBase + 9,
        Provider_IgnoringExplicitSet            = ProviderManagerBase + 10,
        Provider_NotLoaded                      = ProviderManagerBase + 11,
        Provider_Manager_Already_Loaded         = ProviderManagerBase + 12,
        Provider_CatalogNoStorageProvider_3     = ProviderManagerBase + 13,
        Provider_ProviderLoadedOk               = ProviderManagerBase + 14,
        Provider_ProviderNotFound               = ProviderManagerBase + 15,
        Provider_ProviderNotControllable        = ProviderManagerBase + 16,

        AzureQueueBase = Runtime + 3200,
        AzureQueue_01 = AzureQueueBase + 1,
        AzureQueue_02 = AzureQueueBase + 2,
        AzureQueue_03 = AzureQueueBase + 3,
        AzureQueue_04 = AzureQueueBase + 4,
        AzureQueue_05 = AzureQueueBase + 5,
        AzureQueue_06 = AzureQueueBase + 6,
        AzureQueue_07 = AzureQueueBase + 7,
        AzureQueue_08 = AzureQueueBase + 8,
        AzureQueue_09 = AzureQueueBase + 9,
        AzureQueue_10 = AzureQueueBase + 10,
        AzureQueue_11 = AzureQueueBase + 11,
        AzureQueue_12 = AzureQueueBase + 12,
        AzureQueue_13 = AzureQueueBase + 13,
        AzureQueue_14 = AzureQueueBase + 14,
        AzureQueue_15 = AzureQueueBase + 15,

        PersistentStreamPullingAgentBase = Runtime + 3300,
        PersistentStreamPullingAgent_01 = PersistentStreamPullingAgentBase + 1,
        PersistentStreamPullingAgent_02 = PersistentStreamPullingAgentBase + 2,
        PersistentStreamPullingAgent_03 = PersistentStreamPullingAgentBase + 3,
        PersistentStreamPullingAgent_04 = PersistentStreamPullingAgentBase + 4,
        PersistentStreamPullingAgent_05 = PersistentStreamPullingAgentBase + 5,
        PersistentStreamPullingAgent_06 = PersistentStreamPullingAgentBase + 6,
        PersistentStreamPullingAgent_07 = PersistentStreamPullingAgentBase + 7,
        PersistentStreamPullingAgent_08 = PersistentStreamPullingAgentBase + 8,
        PersistentStreamPullingAgent_09 = PersistentStreamPullingAgentBase + 9,
        PersistentStreamPullingAgent_10 = PersistentStreamPullingAgentBase + 10,
        PersistentStreamPullingAgent_11 = PersistentStreamPullingAgentBase + 11,
        PersistentStreamPullingAgent_12 = PersistentStreamPullingAgentBase + 12,
        PersistentStreamPullingAgent_13 = PersistentStreamPullingAgentBase + 13,
        PersistentStreamPullingAgent_14 = PersistentStreamPullingAgentBase + 14,
        PersistentStreamPullingAgent_15 = PersistentStreamPullingAgentBase + 15,
        PersistentStreamPullingAgent_16 = PersistentStreamPullingAgentBase + 16,
        PersistentStreamPullingAgent_17 = PersistentStreamPullingAgentBase + 17,
        PersistentStreamPullingAgent_18 = PersistentStreamPullingAgentBase + 18,
        PersistentStreamPullingAgent_19 = PersistentStreamPullingAgentBase + 19,
        PersistentStreamPullingAgent_20 = PersistentStreamPullingAgentBase + 20,
        PersistentStreamPullingAgent_21 = PersistentStreamPullingAgentBase + 21,
        PersistentStreamPullingAgent_22 = PersistentStreamPullingAgentBase + 22,
        PersistentStreamPullingAgent_23 = PersistentStreamPullingAgentBase + 23,
        PersistentStreamPullingAgent_24 = PersistentStreamPullingAgentBase + 24,
        PersistentStreamPullingAgent_25 = PersistentStreamPullingAgentBase + 25,
        PersistentStreamPullingAgent_26 = PersistentStreamPullingAgentBase + 26,
        PersistentStreamPullingAgent_27 = PersistentStreamPullingAgentBase + 27,
        PersistentStreamPullingAgent_28 = PersistentStreamPullingAgentBase + 28,

        StreamProviderManagerBase = Runtime +3400,
        StreamProvider_FailedToDispose              = StreamProviderManagerBase + 1,
        StreamProvider_ProducerFailedToUnregister   = StreamProviderManagerBase + 2,
        StreamProvider_NoStreamForItem              = StreamProviderManagerBase + 3,
        StreamProvider_AddObserverException         = StreamProviderManagerBase + 4,
        Stream_ExtensionNotInstalled                = StreamProviderManagerBase + 5,
        Stream_ProducerIsDead                       = StreamProviderManagerBase + 6,
        StreamProvider_NoStreamForBatch             = StreamProviderManagerBase + 7,
        StreamProvider_ConsumerFailedToUnregister   = StreamProviderManagerBase + 8,
        Stream_ConsumerIsDead                       = StreamProviderManagerBase + 9,
        Stream_RegisterProducerFailed               = StreamProviderManagerBase + 10,
        Stream_UnegisterProducerFailed              = StreamProviderManagerBase + 11,
        Stream_RegisterConsumerFailed               = StreamProviderManagerBase + 12,
        Stream_UnregisterConsumerFailed             = StreamProviderManagerBase + 13,
        Stream_SetSubscriptionToFaultedFailed       = StreamProviderManagerBase + 14,

        PersistentStreamPullingManagerBase = Runtime + 3500,
        PersistentStreamPullingManager_01 = PersistentStreamPullingManagerBase + 1,
        PersistentStreamPullingManager_02 = PersistentStreamPullingManagerBase + 2,
        PersistentStreamPullingManager_03 = PersistentStreamPullingManagerBase + 3,
        PersistentStreamPullingManager_04 = PersistentStreamPullingManagerBase + 4,
        PersistentStreamPullingManager_05 = PersistentStreamPullingManagerBase + 5,
        PersistentStreamPullingManager_06 = PersistentStreamPullingManagerBase + 6,
        PersistentStreamPullingManager_07 = PersistentStreamPullingManagerBase + 7,
        PersistentStreamPullingManager_08 = PersistentStreamPullingManagerBase + 8,
        PersistentStreamPullingManager_09 = PersistentStreamPullingManagerBase + 9,
        PersistentStreamPullingManager_10 = PersistentStreamPullingManagerBase + 10,
        PersistentStreamPullingManager_11 = PersistentStreamPullingManagerBase + 11,
        PersistentStreamPullingManager_12 = PersistentStreamPullingManagerBase + 12,
        PersistentStreamPullingManager_13 = PersistentStreamPullingManagerBase + 13,
        PersistentStreamPullingManager_14 = PersistentStreamPullingManagerBase + 14,
        PersistentStreamPullingManager_15 = PersistentStreamPullingManagerBase + 15,
        PersistentStreamPullingManager_16 = PersistentStreamPullingManagerBase + 16,
        PersistentStreamPullingManager_Starting         = PersistentStreamPullingManagerBase + 17,
        PersistentStreamPullingManager_Stopping         = PersistentStreamPullingManagerBase + 18,
        PersistentStreamPullingManager_Started          = PersistentStreamPullingManagerBase + 19,
        PersistentStreamPullingManager_Stopped          = PersistentStreamPullingManagerBase + 20,
        PersistentStreamPullingManager_AlreadyStarted   = PersistentStreamPullingManagerBase + 21,
        PersistentStreamPullingManager_AlreadyStopped   = PersistentStreamPullingManagerBase + 22,
        PersistentStreamPullingManager_PeriodicPrint    = PersistentStreamPullingManagerBase + 23,
        
        AzureServiceRuntimeWrapper          = Runtime + 3700,
        AzureServiceRuntime_NotLoaded       = AzureServiceRuntimeWrapper +1,
        AzureServiceRuntime_FailedToLoad    = AzureServiceRuntimeWrapper + 2,

        CodeGenBase                         = Runtime + 3800,
        CodeGenCompilationFailed            = CodeGenBase + 1,
        CodeGenCompilationSucceeded         = CodeGenBase + 2,
        CodeGenSourceGenerated              = CodeGenBase + 3,
        CodeGenSerializerGenerator          = CodeGenBase + 4,
        CodeGenIgnoringTypes                = CodeGenBase + 5,
        CodeGenDllMissing                   = CodeGenBase + 6,
        CodeGenSystemTypeRequiresSerializer = CodeGenBase + 7,

        MultiClusterNetworkBase = Runtime + 3900,
        MultiClusterNetwork_Starting = MultiClusterNetworkBase + 1,
        MultiClusterNetwork_Started = MultiClusterNetworkBase + 2,
        MultiClusterNetwork_FailedToStart = MultiClusterNetworkBase + 3,
        MultiClusterNetwork_LocalSubscriberException = MultiClusterNetworkBase + 4,
        MultiClusterNetwork_GossipCommunicationFailure = MultiClusterNetworkBase + 5,
        MultiClusterNetwork_NoChannelsConfigured = MultiClusterNetworkBase + 6,

        CancellationTokenManagerBase        = Runtime + 4000,
        CancellationTokenCancelFailed       = CancellationTokenManagerBase + 1,
        CancellationExtensionCreationFailed = CancellationTokenManagerBase + 2,

        GlobalSingleInstanceBase = Runtime + 4100,
        GlobalSingleInstance_ProtocolError = GlobalSingleInstanceBase + 1,
        GlobalSingleInstance_WarningInvalidOrigin = GlobalSingleInstanceBase + 2,
        GlobalSingleInstance_MaintainerException = GlobalSingleInstanceBase + 3,
        GlobalSingleInstance_MultipleOwners = GlobalSingleInstanceBase + 4,

    }
}
// ReSharper restore InconsistentNaming
