Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Titanium-Web-Proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Titanium-Web-Proxy
Commits
9927f5b6
Commit
9927f5b6
authored
Dec 30, 2017
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
budy size fixed in wpf demo app
parent
6e10c893
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
9 deletions
+32
-9
MainWindow.xaml.cs
Examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml.cs
+7
-4
SessionListItem.cs
Examples/Titanium.Web.Proxy.Examples.Wpf/SessionListItem.cs
+25
-5
No files found.
Examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml.cs
View file @
9927f5b6
...
@@ -11,7 +11,6 @@ using Titanium.Web.Proxy.EventArguments;
...
@@ -11,7 +11,6 @@ using Titanium.Web.Proxy.EventArguments;
using
Titanium.Web.Proxy.Helpers
;
using
Titanium.Web.Proxy.Helpers
;
using
Titanium.Web.Proxy.Http
;
using
Titanium.Web.Proxy.Http
;
using
Titanium.Web.Proxy.Models
;
using
Titanium.Web.Proxy.Models
;
using
Titanium.Web.Proxy.Network
;
namespace
Titanium.Web.Proxy.Examples.Wpf
namespace
Titanium.Web.Proxy.Examples.Wpf
{
{
...
@@ -135,10 +134,9 @@ namespace Titanium.Web.Proxy.Examples.Wpf
...
@@ -135,10 +134,9 @@ namespace Titanium.Web.Proxy.Examples.Wpf
SessionListItem
item
=
null
;
SessionListItem
item
=
null
;
await
Dispatcher
.
InvokeAsync
(()
=>
await
Dispatcher
.
InvokeAsync
(()
=>
{
{
if
(
sessionDictionary
.
TryGetValue
(
e
.
WebSession
,
out
var
item2
))
if
(
sessionDictionary
.
TryGetValue
(
e
.
WebSession
,
out
item
))
{
{
item2
.
Update
();
item
.
Update
();
item
=
item2
;
}
}
});
});
...
@@ -148,6 +146,11 @@ namespace Titanium.Web.Proxy.Examples.Wpf
...
@@ -148,6 +146,11 @@ namespace Titanium.Web.Proxy.Examples.Wpf
{
{
e
.
WebSession
.
Response
.
KeepBody
=
true
;
e
.
WebSession
.
Response
.
KeepBody
=
true
;
await
e
.
GetResponseBody
();
await
e
.
GetResponseBody
();
await
Dispatcher
.
InvokeAsync
(()
=>
{
item
.
Update
();
});
}
}
}
}
}
}
...
...
Examples/Titanium.Web.Proxy.Examples.Wpf/SessionListItem.cs
View file @
9927f5b6
...
@@ -13,7 +13,7 @@ namespace Titanium.Web.Proxy.Examples.Wpf
...
@@ -13,7 +13,7 @@ namespace Titanium.Web.Proxy.Examples.Wpf
private
string
protocol
;
private
string
protocol
;
private
string
host
;
private
string
host
;
private
string
url
;
private
string
url
;
private
long
bodySize
;
private
long
?
bodySize
;
private
string
process
;
private
string
process
;
private
long
receivedDataCount
;
private
long
receivedDataCount
;
private
long
sentDataCount
;
private
long
sentDataCount
;
...
@@ -48,7 +48,7 @@ namespace Titanium.Web.Proxy.Examples.Wpf
...
@@ -48,7 +48,7 @@ namespace Titanium.Web.Proxy.Examples.Wpf
set
=>
SetField
(
ref
url
,
value
);
set
=>
SetField
(
ref
url
,
value
);
}
}
public
long
BodySize
public
long
?
BodySize
{
{
get
=>
bodySize
;
get
=>
bodySize
;
set
=>
SetField
(
ref
bodySize
,
value
);
set
=>
SetField
(
ref
bodySize
,
value
);
...
@@ -76,8 +76,11 @@ namespace Titanium.Web.Proxy.Examples.Wpf
...
@@ -76,8 +76,11 @@ namespace Titanium.Web.Proxy.Examples.Wpf
protected
void
SetField
<
T
>(
ref
T
field
,
T
value
,[
CallerMemberName
]
string
propertyName
=
null
)
protected
void
SetField
<
T
>(
ref
T
field
,
T
value
,[
CallerMemberName
]
string
propertyName
=
null
)
{
{
field
=
value
;
if
(!
Equals
(
field
,
value
))
OnPropertyChanged
(
propertyName
);
{
field
=
value
;
OnPropertyChanged
(
propertyName
);
}
}
}
[
NotifyPropertyChangedInvocator
]
[
NotifyPropertyChangedInvocator
]
...
@@ -105,7 +108,24 @@ namespace Titanium.Web.Proxy.Examples.Wpf
...
@@ -105,7 +108,24 @@ namespace Titanium.Web.Proxy.Examples.Wpf
Url
=
request
.
RequestUri
.
AbsolutePath
;
Url
=
request
.
RequestUri
.
AbsolutePath
;
}
}
BodySize
=
response
?.
ContentLength
??
-
1
;
if
(!
IsTunnelConnect
)
{
long
responseSize
=
-
1
;
if
(
response
!=
null
)
{
if
(
response
.
ContentLength
!=
-
1
)
{
responseSize
=
response
.
ContentLength
;
}
else
if
(
response
.
IsBodyRead
&&
response
.
Body
!=
null
)
{
responseSize
=
response
.
Body
.
Length
;
}
}
BodySize
=
responseSize
;
}
Process
=
GetProcessDescription
(
WebSession
.
ProcessId
.
Value
);
Process
=
GetProcessDescription
(
WebSession
.
ProcessId
.
Value
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment