Produced by Araxis Merge on 11/6/2017 12:10:30 PM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | ccre.zip\ccre\Components\ZZZ | uZZ_RPCEvent.pas | Thu Nov 2 15:25:38 2017 UTC |
| 2 | ccre.zip\ccre\Components\ZZZ | uZZ_RPCEvent.pas | Mon Nov 6 14:38:40 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 476 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | unit uZZ_R PCEvent; | |
| 2 | { | |
| 3 | ========== ========== ========== ========== ========== ========== ========== ========== | |
| 4 | * | |
| 5 | * Pa ckage: develo pment tool | |
| 6 | * Da te Created : 5/08/1 2 | |
| 7 | * Si te: Hines OIFO | |
| 8 | * De velopers: | |
| 9 | * PII | |
| 10 | * | |
| 11 | * De scription: Implem entation o f RPCEvent Item of th e Event lo g | |
| 12 | * | |
| 13 | ========== ========== ========== ========== ========== ========== ========== ========== | |
| 14 | } | |
| 15 | ||
| 16 | interface | |
| 17 | uses | |
| 18 | Classes | |
| 19 | , uZZ_De scribedIte m | |
| 20 | , TRPCB | |
| 21 | , Dialog s | |
| 22 | ; | |
| 23 | ||
| 24 | type | |
| 25 | TRPCEven tItem = cl ass(TmDesc ribedItem) | |
| 26 | public | |
| 27 | Start: TDateTime ; | |
| 28 | Stop: TDateTime; | |
| 29 | RPCCon text: stri ng; | |
| 30 | Broker Info: Stri ng; | |
| 31 | RPC: s tring; | |
| 32 | Params : TStrings ; | |
| 33 | Result s: TString s; | |
| 34 | Errors : TStrings ; | |
| 35 | ||
| 36 | constr uctor Crea te; | |
| 37 | destru ctor Destr oy; overri de; | |
| 38 | proced ure Append Results(aR esults:TSt rings;aSta rt,aStop:T DateTime); | |
| 39 | proced ure Append Error(anEr ror:String ); | |
| 40 | end; | |
| 41 | ||
| 42 | function g etRPCEvent Item( | |
| 43 | aStart, aStop: TDa teTime; | |
| 44 | aConnect ion: Strin g; | |
| 45 | aBrokerI nfo:String ; | |
| 46 | RemotePr ocedure: s tring; | |
| 47 | Paramete rs: TStrin gs; // arr ay of stri ng; | |
| 48 | MultList : TStringL ist = nil; | |
| 49 | RetList: TStrings = nil): TR PCEventIte m; | |
| 50 | ||
| 51 | function g etTRPCBEve ntItem(aRP CB: TRPCBr oker): TRP CEventItem ; | |
| 52 | ||
| 53 | var | |
| 54 | ServerDe lay: TDate Time; | |
| 55 | CheckBro kerFlag: B oolean; | |
| 56 | RPCCount : Integer; | |
| 57 | ||
| 58 | implementa tion | |
| 59 | uses | |
| 60 | SysUtils | |
| 61 | ; | |
| 62 | ||
| 63 | ////////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// | |
| 64 | const | |
| 65 | fmtParam s = 'Para ms: ---- ---------- ---------- ---------- ---------- ------'; | |
| 66 | fmtResul ts = 'Resu lts: ---- ---------- ---------- ---------- ---------- ------'; | |
| 67 | fmtError s = 'Erro rs: ---- ---------- ---------- ---------- ---------- ------'; | |
| 68 | fmtRef = 'Refe rence ''%s '''; | |
| 69 | fmtLit = 'Lite ral ''%s '''; | |
| 70 | fmtOutpu t = '%-7. 7d %s'; | |
| 71 | fmtConte xt = 'Cont ext: ''%s '''; | |
| 72 | fmtRPC = 'RPC: ''%s '''; | |
| 73 | fmtRPCBI nfo ='Brok er: ''%s '''; | |
| 74 | fmtConne ct = 'Acco unt: %s:% d %s (%s)' ; | |
| 75 | ||
| 76 | function g etRPCEvent Item( | |
| 77 | aStart, aStop: TDa teTime; | |
| 78 | aConnect ion:String ; | |
| 79 | aBrokerI nfo:String ; | |
| 80 | RemotePr ocedure: s tring; | |
| 81 | Paramete rs: TStrin gs; //arr ay of stri ng; | |
| 82 | MultList : TStringL ist = nil; | |
| 83 | RetList: TStrings = nil): TR PCEventIte m; | |
| 84 | var | |
| 85 | Item: TR PCEventIte m; | |
| 86 | i, j: In teger; | |
| 87 | begin | |
| 88 | Item := TRPCEventI tem.Create ; | |
| 89 | Item.Sta rt := aSta rt; | |
| 90 | Item.Sto p := aStop ; | |
| 91 | Item.RPC := Remote Procedure; | |
| 92 | Item.RPC Context := aConnecti on; | |
| 93 | Item.Bro kerInfo := aBrokerIn fo; | |
| 94 | Item.Par ams.Add(fm tParams); | |
| 95 | ||
| 96 | for i := 0 to Para meters.Cou nt - 1 do | |
| 97 | begin | |
| 98 | if (Co py(Paramet ers[i], 1, 1) = '@') and (Para meters[i] <> '@') th en | |
| 99 | Item .Params.Ad d(Format(f mtRef,[Cop y(Paramete rs[i], 2, Length(Par ameters[i] ))])) | |
| 100 | else | |
| 101 | Item .Params.Ad d(Format(f mtLit,[Par ameters[i] ])); | |
| 102 | end; | |
| 103 | ||
| 104 | if MultL ist <> nil then | |
| 105 | if Mul tList.Coun t > 0 then | |
| 106 | begin | |
| 107 | Item .Params.Ad d('List:') ; | |
| 108 | for j := 1 to MultList.C ount do | |
| 109 | It em.Params. Add(MultLi st[j - 1]) ; | |
| 110 | end; | |
| 111 | ||
| 112 | if RetLi st <> nil then | |
| 113 | if Ret List.Count > 0 then | |
| 114 | begin | |
| 115 | for j := 0 to RetList.Co unt - 1 do | |
| 116 | It em.Results .Add(RetLi st[j]); | |
| 117 | end; | |
| 118 | Result : = Item; | |
| 119 | ||
| 120 | inc(RPCC ount); | |
| 121 | Item.Des cription.T ext := ' ' + | |
| 122 | Format DateTime(' hh:mm:ss.z zz -- ',aS tart) + | |
| 123 | Format DateTime(' hh:mm:ss.z zz ',aS top) + ' ' + | |
| 124 | Format DateTime(' (hh:mm:ss. zzz)',aSto p-aStart) + #13#10 + | |
| 125 | ||
| 126 | Format (fmtContex t,[Item.RP CContext]) + #13#10 + | |
| 127 | Format (fmtRPC,[I tem.RPC]) + #13#10 + | |
| 128 | Format (fmtRPCBin fo,[Item.B rokerInfo] ) + #13#10 + | |
| 129 | #13#10 + | |
| 130 | Item.P arams.Text + #13#10; | |
| 131 | Item.Des cription.T ext := Ite m.Descript ion.Text + | |
| 132 | fmtRes ults +#13# 10; | |
| 133 | for i := 0 to Item .Results.C ount - 1 d o | |
| 134 | Item.D escription .Text := I tem.Descri ption.Text + | |
| 135 | Form at(fmtOutp ut,[i,Item .Results[i ]]) + #13# 10; | |
| 136 | ||
| 137 | Item.Des cription.T ext := Ite m.Descript ion.Text + | |
| 138 | fmtRes ults; | |
| 139 | ||
| 140 | end; | |
| 141 | ||
| 142 | function g etTRPCBEve ntItem(aRP CB: TRPCBr oker): TRP CEventItem ; | |
| 143 | var | |
| 144 | i,j: Int eger; | |
| 145 | item : T RPCEventIt em; | |
| 146 | ss,sss: String; | |
| 147 | begin | |
| 148 | Item:= T RPCEventIt em.Create; | |
| 149 | Item.RPC := aRPCB. RemoteProc edure; | |
| 150 | Item.RPC Context := aRPCB.Cur rentContex t; | |
| 151 | ||
| 152 | for i := 0 to aRPC B.Param.Co unt - 1 do | |
| 153 | begin | |
| 154 | if aRP CB.Param[i ].PType = Literal th en | |
| 155 | It em.Params. Add(Format (fmtLit,[a RPCB.Param [i].Value] )) | |
| 156 | else i f aRPCB.Pa ram[i].PTy pe = Refer ence then | |
| 157 | It em.Params. Add(Format (fmtRef,[' @'+aRPCB.P aram[i].Va lue])) | |
| 158 | else i f aRPCB.Pa ram[i].PTy pe = List then | |
| 159 | begi n | |
| 160 | fo r j := 0 t o aRPCB.Pa ram[i].Mul t.Count - 1 do | |
| 161 | begin | |
| 162 | ss := aR PCB.Param[ i].Mult.Su bscript(j) ; | |
| 163 | sss := F ormat('Lis t [%-2 0.20s] = ' '%s''',[ss ,aRPCB.Par am[i].Mult [ss]]); | |
| 164 | Item.Par ams.Add(ss s); | |
| 165 | end; | |
| 166 | end | |
| 167 | end; | |
| 168 | ||
| 169 | Item.Des cription.T ext := | |
| 170 | Format (fmtContex t,[Item.RP CContext]) + #13#10 + | |
| 171 | Format (fmtRPC,[I tem.RPC]) + # 13#10 + | |
| 172 | Format (fmtConnec t,[aRPCB.S erver,aRPC B.Listener Port, aRPC B.User.Nam e,aRPCB.Us er.DUZ]) + #13#10#13# 10 + | |
| 173 | fmtPar ams + #13# 10 + | |
| 174 | Item.P arams.Text + #13#10 + | |
| 175 | fmtRes ults + #13 #10; | |
| 176 | ||
| 177 | Result : = Item; | |
| 178 | end; | |
| 179 | ||
| 180 | ////////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// | |
| 181 | ||
| 182 | constructo r TRPCEven tItem.Crea te; | |
| 183 | begin | |
| 184 | inherite d Create(n il); | |
| 185 | Params : = TStringL ist.Create ; | |
| 186 | Results := TString List.Creat e; | |
| 187 | Errors : = TStringL ist.Create ; | |
| 188 | end; | |
| 189 | ||
| 190 | destructor TRPCEvent Item.Destr oy; | |
| 191 | begin | |
| 192 | Params.F ree; | |
| 193 | Results. Free; | |
| 194 | Errors.F ree; | |
| 195 | inherite d; | |
| 196 | end; | |
| 197 | ||
| 198 | procedure TRPCEventI tem.Append Results(aR esults:TSt rings;aSta rt,aStop:T DateTime); | |
| 199 | var | |
| 200 | i: Integ er; | |
| 201 | begin | |
| 202 | Start := aStart; | |
| 203 | Stop := aStop; | |
| 204 | Descript ion.Text : = ' ' + | |
| 205 | Format DateTime(' hh:mm:ss.z zz -- ',aS tart) + | |
| 206 | Format DateTime(' hh:mm:ss.z zz ',aS top) + ' ' + | |
| 207 | Format DateTime(' (hh:mm:ss. zzz)',aSto p-aStart) + #13#10 + | |
| 208 | Descri ption.Text ; | |
| 209 | ||
| 210 | if Assig ned(aResul ts) then | |
| 211 | begin | |
| 212 | Resu lts.Assign (aResults) ; | |
| 213 | for i := 0 to aResults.C ount - 1 d o | |
| 214 | De scription. Text := De scription. Text + | |
| 215 | Format(fmt Output,[i, aResults[i ]]); | |
| 216 | Desc ription.Te xt := Desc ription.Te xt + fmtRe sults; | |
| 217 | ||
| 218 | end; | |
| 219 | end; | |
| 220 | ||
| 221 | procedure TRPCEventI tem.Append Error(anEr ror:String ); | |
| 222 | var | |
| 223 | i: integ er; | |
| 224 | begin | |
| 225 | Errors.T ext := Err ors.Text + anError; | |
| 226 | Descript ion.Text : = Descript ion.Text + #13#10 + fmtErrors + #13#10; | |
| 227 | for i := 0 to Erro rs.Count - 1 do | |
| 228 | Des cription.T ext := Des cription.T ext + Erro rs[i]; | |
| 229 | Descript ion.Text : = Descript ion.Text + fmtErrors + #13#10; | |
| 230 | ||
| 231 | end; | |
| 232 | ////////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// | |
| 233 | ||
| 234 | initializa tion | |
| 235 | CheckBro kerFlag := False; | |
| 236 | RPCCount := 0; | |
| 237 | ||
| 238 | finalizati on | |
| 239 | end. |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.