Skip to content

Commit 0c58588

Browse files
hcorghakanurhan
authored andcommitted
Daemon: ObjectIdentifierMaxLength added to default options
1 parent 04de64d commit 0c58588

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Service.Implementation/Asn1Service.fs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ type Asn1Service() =
2222
Dto.GenerationOptions.TypePrefix = ""
2323
Dto.GenerationOptions.FieldPrefix = CommonTypes.FieldPrefixAuto
2424
Dto.GenerationOptions.RenamePolicy = CommonTypes.EnumRenamePolicy.SelectiveEnumerants
25+
Dto.GenerationOptions.ObjectIdentifierMaxLength = 8
2526
}
2627

2728
interface IAsn1Service with
@@ -79,8 +80,7 @@ type Asn1Service() =
7980
custom_Stg_Ast_Version = 1
8081
fieldPrefix = match box options.FieldPrefix with | null -> None | _ -> Some(options.FieldPrefix)
8182
targetLanguages = match box options.TargetLanguage with | null -> [defaultOptions.TargetLanguage] | _ -> [options.TargetLanguage]
82-
floatingPointSizeInBytes = 8I
83-
objectIdentifierMaxLength = 8I
83+
objectIdentifierMaxLength = bigint(match options.ObjectIdentifierMaxLength with | 0 -> defaultOptions.ObjectIdentifierMaxLength | _ -> options.ObjectIdentifierMaxLength)
8484
}
8585

8686
member private this.ConvertInput (input:Dto.FileData) : CommonTypes.Input =

Service/Dto.fs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ type GenerationOptions = {
1010
TypePrefix: string
1111
FieldPrefix: CommonTypes.FieldPrefix
1212
RenamePolicy: CommonTypes.EnumRenamePolicy
13+
ObjectIdentifierMaxLength: int
1314
}
1415

1516
type FileData = {

0 commit comments

Comments
 (0)