WhatsAppApi.Parser.FMessage.GetMessage_WA_Type C# (CSharp) Method

GetMessage_WA_Type() public static method

public static GetMessage_WA_Type ( string type ) : Type
type string
return System.Type
        public static Type GetMessage_WA_Type(string type)
        {
            if ((type != null) && (type.Length != 0))
            {
                if (type.ToUpper().Equals("system".ToUpper()))
                {
                    return Type.System;
                }
                if (type.ToUpper().Equals("image".ToUpper()))
                {
                    return Type.Image;
                }
                if (type.ToUpper().Equals("audio".ToUpper()))
                {
                    return Type.Audio;
                }
                if (type.ToUpper().Equals("video".ToUpper()))
                {
                    return Type.Video;
                }
                if (type.ToUpper().Equals("vcard".ToUpper()))
                {
                    return Type.Contact;
                }
                if (type.ToUpper().Equals("location".ToUpper()))
                {
                    return Type.Location;
                }
            }
            return Type.Undefined;
        }