@@ -55,42 +55,39 @@ public void CreateMaps(IMapperConstructor mapper)
55
55
56
56
mapper . CreateMap < IDictionary < string , IppAttribute [ ] > , JobDescriptionAttributes > ( ( src , map ) => new JobDescriptionAttributes
57
57
{
58
- Copies = map . MapFromDic < int ? > ( src , JobAttribute . Copies ) ,
59
58
DateTimeAtCompleted = map . MapFromDic < DateTimeOffset ? > ( src , JobAttribute . DateTimeAtCompleted ) ,
60
59
DateTimeAtCreation = map . MapFromDic < DateTimeOffset ? > ( src , JobAttribute . DateTimeAtCreation ) ,
61
60
DateTimeAtProcessing = map . MapFromDic < DateTimeOffset ? > ( src , JobAttribute . DateTimeAtProcessing ) ,
62
- Finishings = map . MapFromDic < Finishings ? > ( src , JobAttribute . Finishings ) ,
63
61
JobId = map . MapFromDic < int ? > ( src , JobAttribute . JobId ) ,
64
62
JobUri = map . MapFromDic < string ? > ( src , JobAttribute . JobUri ) ,
65
63
JobImpressionsCompleted = map . MapFromDic < int ? > ( src , JobAttribute . JobImpressionsCompleted ) ,
66
64
JobMediaSheetsCompleted = map . MapFromDic < int ? > ( src , JobAttribute . JobMediaSheetsCompleted ) ,
67
65
JobOriginatingUserName = map . MapFromDic < string ? > ( src , JobAttribute . JobOriginatingUserName ) ,
68
- JobOriginatingUserNameLanguage =
69
- map . MapFromDicLanguage ( src , JobAttribute . JobOriginatingUserNameLanguage ) ,
70
66
JobPrinterUpTime = map . MapFromDic < int ? > ( src , JobAttribute . JobPrinterUpTime ) ,
71
67
JobPrinterUri = map . MapFromDic < string ? > ( src , JobAttribute . JobPrinterUri ) ,
72
- JobSheets = map . MapFromDic < JobSheets ? > ( src , JobAttribute . JobSheets ) ,
73
68
JobState = map . MapFromDic < JobState ? > ( src , JobAttribute . JobState ) ,
74
69
JobStateMessage = map . MapFromDic < string ? > ( src , JobAttribute . JobStateMessage ) ,
75
70
JobStateReasons = map . MapFromDicSetNull < JobStateReason [ ] ? > ( src , JobAttribute . JobStateReasons ) ,
76
- Media = map . MapFromDic < string ? > ( src , JobAttribute . Media ) ,
77
- MultipleDocumentHandling =
78
- map . MapFromDic < MultipleDocumentHandling ? > ( src , JobAttribute . MultipleDocumentHandling ) ,
79
- NumberUp = map . MapFromDic < int ? > ( src , JobAttribute . NumberUp ) ,
80
- OrientationRequested = map . MapFromDic < Orientation ? > ( src , JobAttribute . OrientationRequested ) ,
81
- PrinterResolution = map . MapFromDic < Resolution ? > ( src , JobAttribute . PrinterResolution ) ,
82
- PrintQuality = map . MapFromDic < PrintQuality ? > ( src , JobAttribute . PrintQuality ) ,
83
- Sides = map . MapFromDic < Sides ? > ( src , JobAttribute . Sides ) ,
84
71
TimeAtCompleted = map . MapFromDic < int ? > ( src , JobAttribute . TimeAtCompleted ) ,
85
72
TimeAtCreation = map . MapFromDic < int ? > ( src , JobAttribute . TimeAtCreation ) ,
86
73
TimeAtProcessing = map . MapFromDic < int ? > ( src , JobAttribute . TimeAtProcessing ) ,
74
+ JobName = map . MapFromDic < string ? > ( src , JobAttribute . JobName ) ,
75
+ JobKOctetsProcessed = map . MapFromDic < int ? > ( src , JobAttribute . JobKOctetsProcessed ) ,
76
+ JobImpressions = map . MapFromDic < int ? > ( src , JobAttribute . JobImpressions ) ,
77
+ JobMediaSheets = map . MapFromDic < int ? > ( src , JobAttribute . JobMediaSheets ) ,
78
+ JobMoreInfo = map . MapFromDic < string ? > ( src , JobAttribute . JobMoreInfo ) ,
79
+ NumberOfDocuments = map . MapFromDic < int ? > ( src , JobAttribute . NumberOfDocuments ) ,
80
+ NumberOfInterveningJobs = map . MapFromDic < int ? > ( src , JobAttribute . NumberOfInterveningJobs ) ,
81
+ OutputDeviceAssigned = map . MapFromDic < string ? > ( src , JobAttribute . OutputDeviceAssigned ) ,
82
+ JobKOctets = map . MapFromDic < int ? > ( src , JobAttribute . JobKOctets ) ,
83
+ JobDetailedStatusMessages = map . MapFromDicSetNull < string [ ] ? > ( src , JobAttribute . JobDetailedStatusMessages ) ,
84
+ JobDocumentAccessErrors = map . MapFromDicSetNull < string [ ] ? > ( src , JobAttribute . JobDocumentAccessErrors ) ,
85
+ JobMessageFromOperator = map . MapFromDic < string ? > ( src , JobAttribute . JobMessageFromOperator )
87
86
} ) ;
88
87
89
88
mapper . CreateMap < JobDescriptionAttributes , IDictionary < string , IppAttribute [ ] > > ( ( src , map ) =>
90
89
{
91
90
var dic = new Dictionary < string , IppAttribute [ ] > ( ) ;
92
- if ( src . Copies != null )
93
- dic . Add ( JobAttribute . Copies , new IppAttribute [ ] { new IppAttribute ( Tag . Integer , JobAttribute . Copies , src . Copies . Value ) } ) ;
94
91
if ( src . DateTimeAtCompleted != null )
95
92
{
96
93
if ( src . DateTimeAtCompleted . Value > DateTimeOffset . MinValue )
@@ -112,8 +109,6 @@ public void CreateMaps(IMapperConstructor mapper)
112
109
else
113
110
dic . Add ( JobAttribute . DateTimeAtProcessing , new IppAttribute [ ] { new IppAttribute ( Tag . NoValue , JobAttribute . DateTimeAtProcessing , NoValue . Instance ) } ) ;
114
111
}
115
- if ( src . Finishings != null )
116
- dic . Add ( JobAttribute . Finishings , new IppAttribute [ ] { new IppAttribute ( Tag . Enum , JobAttribute . Finishings , ( int ) src . Finishings . Value ) } ) ;
117
112
if ( src . JobId != null )
118
113
dic . Add ( JobAttribute . JobId , new IppAttribute [ ] { new IppAttribute ( Tag . Integer , JobAttribute . JobId , src . JobId . Value ) } ) ;
119
114
if ( src . JobUri != null )
@@ -124,34 +119,16 @@ public void CreateMaps(IMapperConstructor mapper)
124
119
dic . Add ( JobAttribute . JobMediaSheetsCompleted , new IppAttribute [ ] { new IppAttribute ( Tag . Integer , JobAttribute . JobMediaSheetsCompleted , src . JobMediaSheetsCompleted . Value ) } ) ;
125
120
if ( src . JobOriginatingUserName != null )
126
121
dic . Add ( JobAttribute . JobOriginatingUserName , new IppAttribute [ ] { new IppAttribute ( Tag . NameWithoutLanguage , JobAttribute . JobOriginatingUserName , src . JobOriginatingUserName ) } ) ;
127
- if ( src . JobOriginatingUserNameLanguage != null )
128
- dic . Add ( JobAttribute . JobOriginatingUserNameLanguage , new IppAttribute [ ] { new IppAttribute ( Tag . NaturalLanguage , JobAttribute . JobOriginatingUserNameLanguage , src . JobOriginatingUserNameLanguage ) } ) ;
129
122
if ( src . JobPrinterUpTime != null )
130
123
dic . Add ( JobAttribute . JobPrinterUpTime , new IppAttribute [ ] { new IppAttribute ( Tag . Integer , JobAttribute . JobPrinterUpTime , src . JobPrinterUpTime . Value ) } ) ;
131
124
if ( src . JobPrinterUri != null )
132
125
dic . Add ( JobAttribute . JobPrinterUri , new IppAttribute [ ] { new IppAttribute ( Tag . Uri , JobAttribute . JobPrinterUri , src . JobPrinterUri ) } ) ;
133
- if ( src . JobSheets != null )
134
- dic . Add ( JobAttribute . JobSheets , new IppAttribute [ ] { new IppAttribute ( Tag . Keyword , JobAttribute . JobSheets , map . Map < string > ( src . JobSheets ) ) } ) ;
135
126
if ( src . JobState != null )
136
127
dic . Add ( JobAttribute . JobState , new IppAttribute [ ] { new IppAttribute ( Tag . Enum , JobAttribute . JobState , ( int ) src . JobState . Value ) } ) ;
137
128
if ( src . JobStateMessage != null )
138
129
dic . Add ( JobAttribute . JobStateMessage , new IppAttribute [ ] { new IppAttribute ( Tag . TextWithoutLanguage , JobAttribute . JobStateMessage , src . JobStateMessage ) } ) ;
139
130
if ( src . JobStateReasons ? . Any ( ) ?? false )
140
131
dic . Add ( JobAttribute . JobStateReasons , src . JobStateReasons . Select ( x => new IppAttribute ( Tag . Keyword , JobAttribute . JobStateReasons , map . Map < string > ( x ) ) ) . ToArray ( ) ) ;
141
- if ( src . Media != null )
142
- dic . Add ( JobAttribute . Media , new IppAttribute [ ] { new IppAttribute ( Tag . Keyword , JobAttribute . Media , src . Media ) } ) ;
143
- if ( src . MultipleDocumentHandling != null )
144
- dic . Add ( JobAttribute . MultipleDocumentHandling , new IppAttribute [ ] { new IppAttribute ( Tag . Keyword , JobAttribute . MultipleDocumentHandling , map . Map < string > ( src . MultipleDocumentHandling ) ) } ) ;
145
- if ( src . NumberUp != null )
146
- dic . Add ( JobAttribute . NumberUp , new IppAttribute [ ] { new IppAttribute ( Tag . Integer , JobAttribute . NumberUp , src . NumberUp . Value ) } ) ;
147
- if ( src . OrientationRequested != null )
148
- dic . Add ( JobAttribute . OrientationRequested , new IppAttribute [ ] { new IppAttribute ( Tag . Enum , JobAttribute . OrientationRequested , ( int ) src . OrientationRequested . Value ) } ) ;
149
- if ( src . PrinterResolution != null )
150
- dic . Add ( JobAttribute . PrinterResolution , new IppAttribute [ ] { new IppAttribute ( Tag . Resolution , JobAttribute . PrinterResolution , src . PrinterResolution . Value ) } ) ;
151
- if ( src . PrintQuality != null )
152
- dic . Add ( JobAttribute . PrintQuality , new IppAttribute [ ] { new IppAttribute ( Tag . Enum , JobAttribute . PrintQuality , ( int ) src . PrintQuality . Value ) } ) ;
153
- if ( src . Sides != null )
154
- dic . Add ( JobAttribute . Sides , new IppAttribute [ ] { new IppAttribute ( Tag . Keyword , JobAttribute . Sides , map . Map < string > ( src . Sides ) ) } ) ;
155
132
if ( src . TimeAtCompleted != null )
156
133
{
157
134
if ( src . TimeAtCompleted . Value >= 0 )
@@ -173,6 +150,32 @@ public void CreateMaps(IMapperConstructor mapper)
173
150
else
174
151
dic . Add ( JobAttribute . TimeAtProcessing , new IppAttribute [ ] { new IppAttribute ( Tag . NoValue , JobAttribute . TimeAtProcessing , NoValue . Instance ) } ) ;
175
152
}
153
+ if ( src . JobName != null )
154
+ dic . Add ( JobAttribute . JobName , new IppAttribute [ ] { new IppAttribute ( Tag . NameWithoutLanguage , JobAttribute . JobName , src . JobName ) } ) ;
155
+ if ( src . JobKOctetsProcessed != null )
156
+ dic . Add ( JobAttribute . JobKOctetsProcessed , new IppAttribute [ ] { new IppAttribute ( Tag . Integer , JobAttribute . JobKOctetsProcessed , src . JobKOctetsProcessed . Value ) } ) ;
157
+ if ( src . JobImpressions != null )
158
+ dic . Add ( JobAttribute . JobImpressions , new IppAttribute [ ] { new IppAttribute ( Tag . Integer , JobAttribute . JobImpressions , src . JobImpressions . Value ) } ) ;
159
+ if ( src . JobMediaSheets != null )
160
+ dic . Add ( JobAttribute . JobMediaSheets , new IppAttribute [ ] { new IppAttribute ( Tag . Integer , JobAttribute . JobMediaSheets , src . JobMediaSheets . Value ) } ) ;
161
+ if ( src . JobMoreInfo != null )
162
+ dic . Add ( JobAttribute . JobMoreInfo , new IppAttribute [ ] { new IppAttribute ( Tag . NameWithoutLanguage , JobAttribute . JobMoreInfo , src . JobMoreInfo ) } ) ;
163
+ if ( src . NumberOfDocuments != null )
164
+ dic . Add ( JobAttribute . NumberOfDocuments , new IppAttribute [ ] { new IppAttribute ( Tag . Integer , JobAttribute . NumberOfDocuments , src . NumberOfDocuments . Value ) } ) ;
165
+ if ( src . NumberOfInterveningJobs != null )
166
+ dic . Add ( JobAttribute . NumberOfInterveningJobs , new IppAttribute [ ] { new IppAttribute ( Tag . Integer , JobAttribute . NumberOfInterveningJobs , src . NumberOfInterveningJobs . Value ) } ) ;
167
+ if ( src . OutputDeviceAssigned != null )
168
+ dic . Add ( JobAttribute . OutputDeviceAssigned , new IppAttribute [ ] { new IppAttribute ( Tag . NameWithoutLanguage , JobAttribute . OutputDeviceAssigned , src . OutputDeviceAssigned ) } ) ;
169
+ if ( src . JobKOctets != null )
170
+ dic . Add ( JobAttribute . JobKOctets , new IppAttribute [ ] { new IppAttribute ( Tag . Integer , JobAttribute . JobKOctets , src . JobKOctets . Value ) } ) ;
171
+ if ( src . JobDetailedStatusMessages != null )
172
+ dic . Add ( JobAttribute . JobDetailedStatusMessages , src . JobDetailedStatusMessages . Select ( x => new IppAttribute ( Tag . NameWithoutLanguage , JobAttribute . JobDetailedStatusMessages , x ) ) . ToArray ( ) ) ;
173
+ if ( src . JobDocumentAccessErrors != null )
174
+ dic . Add ( JobAttribute . JobDocumentAccessErrors , src . JobDocumentAccessErrors . Select ( x => new IppAttribute ( Tag . NameWithoutLanguage , JobAttribute . JobDocumentAccessErrors , x ) ) . ToArray ( ) ) ;
175
+ if ( src . JobDocumentAccessErrors != null )
176
+ dic . Add ( JobAttribute . JobDocumentAccessErrors , src . JobDocumentAccessErrors . Select ( x => new IppAttribute ( Tag . NameWithoutLanguage , JobAttribute . JobDocumentAccessErrors , x ) ) . ToArray ( ) ) ;
177
+ if ( src . JobMessageFromOperator != null )
178
+ dic . Add ( JobAttribute . JobMessageFromOperator , new IppAttribute [ ] { new IppAttribute ( Tag . NameWithoutLanguage , JobAttribute . JobMessageFromOperator , src . JobMessageFromOperator ) } ) ;
176
179
return dic ;
177
180
} ) ;
178
181
}
0 commit comments