Skip to content

Commit

Permalink
Misc PCL-related API fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Baulig committed Mar 4, 2013
1 parent 3a87e57 commit 879250e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
Expand Up @@ -65,7 +65,28 @@ public ValidationContext (object instance, IServiceProvider serviceProvider, IDi
// else
ServiceContainer = new ValidationContextServiceContainer ();
}

#if NET_4_5
public ValidationContext (object instance)
: this (instance, null, null)
{
}

public ValidationContext (object instance, IDictionary<object, object> items)
: this (instance, null, items)
{
}

// FIXME: According to MSDN, this should be defined in
// 4.5, Silverlight and PCL
[MonoTODO]
public void InitializeServiceProvider (
Func<Type, Object> serviceProvider)
{
throw new NotImplementedException ();
}
#endif

public object GetService (Type serviceType)
{
return ServiceContainer.GetService (serviceType);
Expand Down
4 changes: 2 additions & 2 deletions mcs/class/System/System.Net/HttpWebRequest.cs
Expand Up @@ -559,9 +559,9 @@ static bool CheckValidHost (string scheme, string val)
internal ServicePoint ServicePointNoLock {
get { return servicePoint; }
}
#if NET_4_5
#if NET_4_0
[MonoTODO ("for portable library support")]
public bool SupportsCookieContainer {
public virtual bool SupportsCookieContainer {
get {
throw new NotImplementedException ();
}
Expand Down
2 changes: 1 addition & 1 deletion mcs/class/System/System.Net/WebRequest.cs
Expand Up @@ -296,7 +296,7 @@ public static WebRequest CreateDefault (Uri requestUri)
throw new ArgumentNullException ("requestUri");
return GetCreator (requestUri.Scheme).Create (requestUri);
}
#if NET_4_5
#if NET_4_0
[MonoTODO ("for portable library support")]
public static HttpWebRequest CreateHttp (string requestUriString)
{
Expand Down
2 changes: 1 addition & 1 deletion mcs/class/System/System.Net/WebResponse.cs
Expand Up @@ -85,7 +85,7 @@ public virtual bool IsMutuallyAuthenticated
public virtual Uri ResponseUri {
get { throw new NotSupportedException (); }
}
#if NET_4_5
#if NET_4_0
[MonoTODO ("for portable library support")]
public virtual bool SupportsHeaders {
get { throw new NotImplementedException (); }
Expand Down

0 comments on commit 879250e

Please sign in to comment.