public AssetIdentifier(AssetIdentifier assetIdentifier) { CustomerId = assetIdentifier.CustomerId; AreaId = assetIdentifier.AreaId; AssetId = assetIdentifier.AssetId; AreaName = assetIdentifier.AreaName; }
public List <AssetIdentifier> AssetIds() { List <AssetIdentifier> list = new List <AssetIdentifier>(); if (TokenizableAssetsList != null) { string[] tokens = TokenizableAssetsList.Split(AssetListDivider); foreach (var token in tokens) { string[] assetIdentifierTokens = token.Split(AssetDivider); if (assetIdentifierTokens.Length == 3) { AssetIdentifier assetId = new AssetIdentifier() { CustomerId = int.Parse(assetIdentifierTokens[0]), AreaId = int.Parse(assetIdentifierTokens[1]), AssetId = Int64.Parse(assetIdentifierTokens[2]), }; list.Add(assetId); } } } return(list); }