有谁知道从自定义对象“破坏”打开哈希表源的方法。自定义对象上没有 .getenumerrator 但我有这个哈希表:@{0=0.05; 1024=0.050;51200=0.050;512000=0.050;1024000=0.045;5120000=0.037}。我通过 Azure RateCard REST API 提取此信息,需要对其进行分解,以便我可以访问每一层费率以生成准确的使用成本报告。有什么建议么?示例输出:
MeterId : d23a5753-ff85-4ddf-af28-8cc5cf2d3882
MeterName : Standard IO - Page Blob/Disk (GB)
MeterCategory : Storage
MeterSubCategory : Locally Redundant
Unit : GB
MeterTags : {}
MeterRegion :
MeterRates : @{0=0.05; 1024=0.050; 51200=0.050; 512000=0.050; 1024000=0.045; 5120000=0.037}
EffectiveDate : 2014-02-01T00:00:00Z
IncludedQuantity : 0.0
TypeName: System.Management.Automation.PSCustomObject
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
EffectiveDate NoteProperty System.String EffectiveDate=2014-02-01T00:00:00Z
IncludedQuantity NoteProperty System.Decimal IncludedQuantity=0.0
MeterCategory NoteProperty System.String MeterCategory=Storage
MeterId NoteProperty System.String MeterId=d23a5753-ff85-4ddf-af28-8cc5cf2d3882
MeterName NoteProperty System.String MeterName=Standard IO - Page Blob/Disk (GB)
MeterRates NoteProperty System.Management.Automation.PSCustomObject MeterRates=@{0=0.05; 1024=0.050; 51200=0.050; 512000=0.050; 1024000=0.045; 5120000=0.037}
MeterRegion NoteProperty System.String MeterRegion=
MeterSubCategory NoteProperty System.String MeterSubCategory=Locally Redundant
MeterTags NoteProperty System.Object[] MeterTags=System.Object[]
Unit NoteProperty System.String Unit=GB