internal class VBCodeCompiler : VBCodeGenerator, ICodeCompiler
{
static string windowsMonoPath;
+#if NET_2_0
static string windowsvbncPath;
+#endif
+
static VBCodeCompiler ()
{
if (Path.DirectorySeparatorChar == '\\') {
#if NET_2_0
windowsvbncPath =
Path.Combine (p, "2.0\\vbnc.exe");
-#else
- windowsvbncPath =
- Path.Combine (p, "1.0\\vbnc.exe");
#endif
}
}
}
}
+#if NET_2_0
static string BuildArgs (CompilerParameters options, string[] fileNames)
{
StringBuilder args = new StringBuilder ();
{
return temp_files.AddExtension (extension, keepFile);
}
+#endif
private static string GetTempFileNameWithExtension (TempFileCollection temp_files, string extension)
{
}
}
- //
- // This is used to prevent confusing Moma about methods not implemented.
- //
- Exception GetNotImplemented ()
- {
- return new NotImplementedException ();
- }
-
//
// Methods
//
}
#endif
+ //
+ // This is used to prevent confusing Moma about methods not implemented.
+ //
+ Exception GetNotImplemented ()
+ {
+ return new NotImplementedException ();
+ }
#endif
}
}
public class DesignerTransactionCloseEventArgs : EventArgs
{
private bool commit;
+#if NET_2_0
private bool last_transaction;
+#endif
#if NET_2_0
- public
-#endif
- DesignerTransactionCloseEventArgs (bool commit, bool lastTransaction)
+ public DesignerTransactionCloseEventArgs (bool commit, bool lastTransaction)
{
this.commit = commit;
- last_transaction = lastTransaction;
+ this.last_transaction = lastTransaction;
}
+#endif
#if NET_2_0
[Obsolete ("Use another constructor that indicates lastTransaction")]
#endif
- public DesignerTransactionCloseEventArgs (bool commit) : this (commit, false)
+ public DesignerTransactionCloseEventArgs (bool commit)
{
+ this.commit = commit;
}
#if NET_2_0
AsyncOperation async;
bool cancel_pending, report_progress = false, support_cancel = false;
- Dictionary<object,AsyncOperation> operations =
- new Dictionary<object,AsyncOperation> ();
-
public event DoWorkEventHandler DoWork;
public event ProgressChangedEventHandler ProgressChanged;
public event RunWorkerCompletedEventHandler RunWorkerCompleted;
if (userSection == null)
continue;
- XmlDocument doc = new XmlDocument ();
-
foreach (SettingsPropertyValue value in collection) {
if (checkUserLevel && value.Property.Attributes.Contains (typeof (SettingsManageabilityAttribute)) != isRoaming)
continue;
}
if (element.Value.ValueXml == null)
element.Value.ValueXml = new XmlDocument ().CreateDocumentFragment ();
- doc = element.Value.ValueXml.OwnerDocument;
switch (value.Property.SerializeAs) {
case SettingsSerializeAs.Xml:
element.Value.ValueXml.InnerXml = value.SerializedValue as string;
set { impl.ApplicationName = value; }
}
+/*
bool IsUserSetting (SettingsProperty prop)
{
#if CONFIGURATION_DEP
return false;
#endif
}
+*/
}
}
d ["indentsize"] = n;
TraceImpl.IndentSize = n;
}
- catch (ConfigurationException e) {
+ catch (ConfigurationException) {
throw;
}
catch (Exception e) {
private string name;
private string description;
private int switchSetting;
- private string value;
#if NET_2_0
+ private string value;
private string defaultSwitchValue;
#endif
// MS Behavior is that (quoting from MSDN for OnSwitchSettingChanged()):
this.name = name;
}
- public virtual void Close ()
+ public override void Close ()
{
w.Close ();
}
public static NetworkInterface [] ImplGetAllNetworkInterfaces ()
{
- Win32_IP_ADAPTER_INFO [] ai = GetAdaptersInfo ();
+// Win32_IP_ADAPTER_INFO [] ai = GetAdaptersInfo ();
Win32_IP_ADAPTER_ADDRESSES [] aa = GetAdaptersAddresses ();
NetworkInterface [] ret = new NetworkInterface [aa.Length];
for (int i = 0; i < ret.Length; i++)
#endregion // Properties
#region Methods
-
+/*
AsymmetricAlgorithm GetPrivateKey (X509Certificate cert, string targetHost)
{
// FIXME: what can I do for non-X509Certificate2 ?
X509Certificate2 cert2 = cert as X509Certificate2;
return cert2 != null ? cert2.PrivateKey : null;
}
-
+*/
X509Certificate OnCertificateSelection (X509CertificateCollection clientCerts, X509Certificate serverCert, string targetHost, X509CertificateCollection serverRequestedCerts)
{
string [] acceptableIssuers = new string [serverRequestedCerts != null ? serverRequestedCerts.Count : 0];
bool disposed;
bool isRead;
int totalRead;
- int contentLength;
ManualResetEvent closewh;
throw new ArgumentException ("socket");
this.request = request;
- this.contentLength = socket.Available;
this.networkStream = new NetworkStream (socket, true);
this.isRead = isRead;
totalRead += nbytes;
if (nbytes == 0) {
- contentLength = totalRead;
networkStream.Close ();
request.SetTransferCompleted ();
}
}
[MonoTODO]
- public static RequestCachePolicy DefaultCachePolicy
+ public static new RequestCachePolicy DefaultCachePolicy
{
get {
throw GetMustImplement ();
int chunked_uses;
bool context_bound;
bool secure;
- X509Certificate2 cert;
AsymmetricAlgorithm key;
public HttpConnection (Socket sock, EndPointListener epl, bool secure, X509Certificate2 cert, AsymmetricAlgorithm key)
this.sock = sock;
this.epl = epl;
this.secure = secure;
- this.cert = cert;
this.key = key;
if (secure == false) {
stream = new NetworkStream (sock, false);
#if NET_2_0
[MonoTODO]
- public static RequestCachePolicy DefaultCachePolicy
+ public static new RequestCachePolicy DefaultCachePolicy
{
get {
throw GetMustImplement ();
}
// TODO 6.1.3.d - check if certificate policies extension is present
- if (false) {
+ //if (false) {
// TODO - for X509ChainStatusFlags.InvalidPolicyConstraints
// using X509ChainPolicy.ApplicationPolicy and X509ChainPolicy.CertificatePolicy
// TODO - check for X509ChainStatusFlags.NoIssuanceChainPolicy
- } else {
+ //} else {
// TODO 6.1.3.e - set valid_policy_tree to NULL
- }
+ //}
// TODO 6.1.3.f - verify explict_policy > 0 if valid_policy_tree != NULL
}
return X509ChainStatusFlags.NoError;\r
}
- private MX.X509Crl OnlineCheck (X509Certificate2 certificate)
- {
- // CRL doesn't exists or couldn't be downloaded
- return null;
- }
-
private MX.X509Crl FindCrl (X509Certificate2 caCertificate)
{
string subject = caCertificate.SubjectName.Decode (X500DistinguishedNameFlags.None);