static AmqpCodec()

in src/AmqpCodec.cs [22:107]


        static AmqpCodec()
        {
            knownTypesByName = new Dictionary<string, Func<AmqpDescribed>>()
            {
                // performatives
                { Open.Name, static () => new Open() },
                { Close.Name, static () => new Close() },
                { Begin.Name, static () => new Begin() },
                { End.Name, static () => new End() },
                { Attach.Name, static () => new Attach() },
                { Detach.Name, static () => new Detach() },
                { Transfer.Name, static () => new Transfer() },
                { Disposition.Name, static () => new Disposition() },
                { Flow.Name, static () => new Flow() },

                // transaction performatives and types
                { Coordinator.Name, static () => new Coordinator() },
                { Declare.Name, static () => new Declare() },
                { Declared.Name, static () => new Declared() },
                { Discharge.Name, static () => new Discharge() },
                { TransactionalState.Name, static () => new TransactionalState() },

                // sasl performatives
                { SaslMechanisms.Name, static () => new SaslMechanisms() },
                { SaslInit.Name, static () => new SaslInit() },
                { SaslChallenge.Name, static () => new SaslChallenge() },
                { SaslResponse.Name, static () => new SaslResponse() },
                { SaslOutcome.Name, static () => new SaslOutcome() },

                // definitions
                { Error.Name, static () => new Error() },
                { Source.Name, static () => new Source() },
                { Target.Name, static () => new Target() },
                { Received.Name, static () => new Received() },
                { Accepted.Name, static () => new Accepted() },
                { Released.Name, static () => new Released() },
                { Rejected.Name, static () => new Rejected() },
                { Modified.Name, static () => new Modified() },
                { DeleteOnClose.Name, static () => new DeleteOnClose() },
                { DeleteOnNoLinks.Name, static () => new DeleteOnNoLinks() },
                { DeleteOnNoMessages.Name, static () => new DeleteOnNoMessages() },
                { DeleteOnNoLinksOrMessages.Name, static () => new DeleteOnNoLinksOrMessages() },
            };

            knownTypesByCode = new Dictionary<ulong, Func<AmqpDescribed>>()
            {
                // frame bodies
                { Open.Code, static () => new Open() },
                { Close.Code, static () => new Close() },
                { Begin.Code, static () => new Begin() },
                { End.Code, static () => new End() },
                { Attach.Code, static () => new Attach() },
                { Detach.Code, static () => new Detach() },
                { Transfer.Code, static () => new Transfer() },
                { Disposition.Code, static () => new Disposition() },
                { Flow.Code, static () => new Flow() },

                // transaction performatives and types
                { Coordinator.Code, static () => new Coordinator() },
                { Declare.Code, static () => new Declare() },
                { Discharge.Code, static () => new Discharge() },
                { Declared.Code, static () => new Declared() },
                { TransactionalState.Code, static () => new TransactionalState() },

                // sasl frames
                { SaslMechanisms.Code, static () => new SaslMechanisms() },
                { SaslInit.Code, static () => new SaslInit() },
                { SaslChallenge.Code, static () => new SaslChallenge() },
                { SaslResponse.Code, static () => new SaslResponse() },
                { SaslOutcome.Code, static () => new SaslOutcome() },

                // definitions
                { Error.Code, static () => new Error() },
                { Source.Code, static () => new Source() },
                { Target.Code, static () => new Target() },
                { Received.Code, static () => new Received() },
                { Accepted.Code, static () => new Accepted() },
                { Released.Code, static () => new Released() },
                { Rejected.Code, static () => new Rejected() },
                { Modified.Code, static () => new Modified() },
                { DeleteOnClose.Code, static () => new DeleteOnClose() },
                { DeleteOnNoLinks.Code, static () => new DeleteOnNoLinks() },
                { DeleteOnNoMessages.Code, static () => new DeleteOnNoMessages() },
                { DeleteOnNoLinksOrMessages.Code, static () => new DeleteOnNoLinksOrMessages() },
            };
        }