Antmicro.Migrant.ObjectWriter.TouchAndWriteTypeIdWithFullStampInner C# (CSharp) Метод

TouchAndWriteTypeIdWithFullStampInner() приватный Метод

private TouchAndWriteTypeIdWithFullStampInner ( Antmicro.Migrant.TypeDescriptor typeDescriptor ) : int
typeDescriptor Antmicro.Migrant.TypeDescriptor
Результат int
        private int TouchAndWriteTypeIdWithFullStampInner(TypeDescriptor typeDescriptor)
        {
            if(typeDescriptor.UnderlyingType.IsGenericParameter)
            {
                writer.Write(typeDescriptor.UnderlyingType.GenericParameterPosition);
                writer.Write(true);
                return TouchAndWriteTypeIdWithFullStamp(typeDescriptor.UnderlyingType.DeclaringType);
            }
            else
            {
                int typeId;
                if(types.Dictionary.TryGetValue(typeDescriptor, out typeId))
                {
                    writer.Write(typeId);
                    writer.Write(false); // generic-argument
                    return typeId;
                }
                typeId = types.AddAndAdvanceId(typeDescriptor);
                writer.Write(typeId);
                writer.Write(false); // generic-argument

                typeDescriptor.Write(this);

                return typeId;
            }
        }