Bender.Nodes.Object.TypeNotSupportedException.GetMessage C# (CSharp) Method

GetMessage() private static method

private static GetMessage ( string typeDescription, CachedType type, Mode mode, string expected ) : string
typeDescription string
type CachedType
mode Mode
expected string
return string
        private static string GetMessage(string typeDescription, 
            CachedType type, Mode mode, string expected)
        {
            string modeNoun;
            string modeVerb;
            switch (mode)
            {
                case Mode.Deserialize:
                    modeVerb = "deserialized";
                    modeNoun = "deserialization";
                    break;
                default:
                    modeVerb = "serialized";
                    modeNoun = "serialization";
                    break;
            }
            return MessageTypeFormat.ToFormat(typeDescription.ToInitialCaps(),
                type.FriendlyFullName, modeNoun, expected, modeVerb);
        }