Class: Msf::Util::DotNetDeserialization::Types::Primitives::ObjId

Inherits:
BinData::Primitive
  • Object
show all
Defined in:
lib/msf/util/dot_net_deserialization/types/primitives.rb

Instance Method Summary collapse

Instance Method Details

#do_read(io) ⇒ Object



115
116
117
118
# File 'lib/msf/util/dot_net_deserialization/types/primitives.rb', line 115

def do_read(io)
  super(io)
  register_self
end

#getObject



120
121
122
# File 'lib/msf/util/dot_net_deserialization/types/primitives.rb', line 120

def get
  self.val
end

#register_selfObject (protected)



131
132
133
134
135
# File 'lib/msf/util/dot_net_deserialization/types/primitives.rb', line 131

def register_self
  stream = DotNetDeserialization.get_ancestor(self, SerializedStream, required: false)
  return if stream.nil?
  stream.set_object(self.val, DotNetDeserialization.get_ancestor(self, Record).record_value)
end

#set(value) ⇒ Object



124
125
126
127
# File 'lib/msf/util/dot_net_deserialization/types/primitives.rb', line 124

def set(value)
  self.val = value
  register_self
end