Beispiel #1
0
        private void ParseMarshalInfo(EmbedAttributeAttribute oMarshalInfo)
        {
            m_bHasMarshal =
                (oMarshalInfo != null) &&
                StringUtil.CompareIgnoreCase(oMarshalInfo.AttributeName, "MarshalAs");

            if (m_bHasMarshal)
            {
                string[] MarshalTypeNameParts = oMarshalInfo.Arguments [0].Value.Split(new char[] { '.' });

                string sMarshalTypeName = MarshalTypeNameParts [MarshalTypeNameParts.Length - 1];

                m_enMarshalType = (UnmanagedType)Enum.Parse(typeof(UnmanagedType), sMarshalTypeName);
            }
        }
Beispiel #2
0
 public MarshalInfo(EmbedAttributeAttribute oMarshalInfo)
 {
     ParseMarshalInfo(oMarshalInfo);
 }