181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
# File 'lib/msf/util/dot_net_deserialization/types/primitives.rb', line 181
def from_member_values(class_info:, member_type_info:, member_values:, **kwargs)
raise ::ArgumentError, 'Invalid class_info type' unless class_info.is_a? Types::General::ClassInfo
raise ::ArgumentError, 'Invalid member_type_info type' unless member_type_info.is_a? Types::General::MemberTypeInfo
raise ::ArgumentError, 'Invalid member count' unless class_info.member_count == member_values.length
kwargs[:class_info] = class_info
kwargs[:member_type_info] = member_type_info
kwargs[:member_values] = MemberValues.new(
member_values,
class_info: class_info,
member_type_info: member_type_info
)
self.new(kwargs, class_info: class_info, member_type_info: member_type_info)
end
|