mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-26 04:19:53 +08:00
Utils.Clone() bug (#249)
Steps to reproduce: Create a variable instance of DataType = Opc.Ua.TimeZoneDataType Read the variable Actual result: Opc.Ua.Utils.Clone() throws exception because the cast to Opc.Ua.TimeZoneDataType is not supported. Expected result: Variable instance of DataType = Opc.Ua.TimeZoneDataType can be read.
This commit is contained in:
committed by
Erich Barnstedt
parent
ce426ae089
commit
34bb611958
@@ -1731,7 +1731,15 @@ namespace Opc.Ua
|
||||
{
|
||||
return castedObject.MemberwiseClone();
|
||||
}
|
||||
}
|
||||
}
|
||||
// copy Opc.Ua.TimeZoneDataType
|
||||
{
|
||||
TimeZoneDataType castedObject = value as TimeZoneDataType;
|
||||
if (castedObject != null)
|
||||
{
|
||||
return castedObject.MemberwiseClone();
|
||||
}
|
||||
}
|
||||
|
||||
// don't know how to clone object.
|
||||
throw new NotSupportedException(Utils.Format("Don't know how to clone objects of type '{0}'", type.FullName));
|
||||
|
||||
Reference in New Issue
Block a user