AgGateway.ADAPT.ISOv4Plugin.Loaders.LinkGroupLoader.UpdateId C# (CSharp) Метод

UpdateId() приватный статический Метод

private static UpdateId ( UniqueId uniqueId, string groupTypeValue, string manufacturerGln, string groupNamespace ) : void
uniqueId UniqueId
groupTypeValue string
manufacturerGln string
groupNamespace string
Результат void
        private static void UpdateId(UniqueId uniqueId, string groupTypeValue, string manufacturerGln, string groupNamespace)
        {
            switch (groupTypeValue)
            {
                case "1":
                    uniqueId.CiTypeEnum = CompoundIdentifierTypeEnum.UUID;
                    break;

                case "2":
                    int value;
                    var isInt = int.TryParse(uniqueId.Id, out value);

                    uniqueId.CiTypeEnum = isInt ? CompoundIdentifierTypeEnum.LongInt : CompoundIdentifierTypeEnum.String;
                    uniqueId.SourceType = IdSourceTypeEnum.GLN;
                    uniqueId.Source = manufacturerGln;
                    break;

                case "3":
                    uniqueId.CiTypeEnum = CompoundIdentifierTypeEnum.String;
                    uniqueId.SourceType = IdSourceTypeEnum.URI;
                    uniqueId.Source = groupNamespace;
                    uniqueId.Id = string.Concat(groupNamespace, uniqueId.Id);
                    break;

                case "4":
                    uniqueId.CiTypeEnum = CompoundIdentifierTypeEnum.String;
                    uniqueId.SourceType = IdSourceTypeEnum.URI;
                    uniqueId.Id = string.Concat(groupNamespace, uniqueId.Id);
                    break;
            }
        }