Class: Msf::Util::DotNetDeserialization::Types::SerializedStream
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- Msf::Util::DotNetDeserialization::Types::SerializedStream
show all
- Defined in:
- lib/msf/util/dot_net_deserialization/types.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.from_values(values) ⇒ Object
84
85
86
87
88
89
90
|
# File 'lib/msf/util/dot_net_deserialization/types.rb', line 84
def self.from_values(values)
stream = self.new
values.each do |contents|
stream.records << Record.from_value(contents, parent: stream.records)
end
stream
end
|
Instance Method Details
#get_object(id) ⇒ Object
92
93
94
95
96
97
|
# File 'lib/msf/util/dot_net_deserialization/types.rb', line 92
def get_object(id)
id = id.value if id.is_a? BinData::BasePrimitive
@objects ||= {}
@objects[id]
end
|
#set_object(id, object) ⇒ Object
99
100
101
102
103
104
|
# File 'lib/msf/util/dot_net_deserialization/types.rb', line 99
def set_object(id, object)
id = id.value if id.is_a? BinData::BasePrimitive
@objects ||= {}
@objects[id] = object
end
|