コード例 #1
0
        static int GetKey(TypeModel model, ref Type type, out bool isList)
        {
            if (model != null && type != null)
            {
                int key = model.GetKey(ref type);
                if (key >= 0)
                {
                    isList = false;
                    return key;
                }
                Type itemType = TypeModel.GetListItemType(model, type);
                if (itemType != null)
                {
                    key = model.GetKey(ref itemType);
                    if (key >= 0)
                    {
                        isList = true;
                        return key;
                    }
                }
            }

            isList = false;
            return -1;
            
        }
コード例 #2
0
ファイル: XmlProtoSerializer.cs プロジェクト: helios57/anrl
 static int GetKey(TypeModel model, Type type)
 {
     return model == null ? -1 : model.GetKey(ref type);
 }