コード例 #1
0
ファイル: CodePointer.cs プロジェクト: d4nnyk/WinDbgCs
        /// <summary>
        /// Initializes a new instance of the <see cref="CodePointer{T}"/> class.
        /// </summary>
        /// <param name="variable">The variable.</param>
        public CodePointer(Variable variable)
            : base(variable)
        {
            if (!GetCodeType().IsPointer)
            {
                throw new Exception("Wrong code type of passed variable " + variable.GetCodeType().Name);
            }

            element = UserMember.Create(() => variable.DereferencePointer().CastAs <T>());
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CodePointer{T}"/> class.
        /// </summary>
        /// <param name="variable">The variable.</param>
        public CodePointer(Variable variable)
            : base(variable)
        {
            if (!GetCodeType().IsPointer)
            {
                throw new WrongCodeTypeException(variable, nameof(variable), "pointer");
            }

            element = UserMember.Create(() => variable.DereferencePointer().CastAs <T>());
        }