return "\"" + output + "\"";
}
- private void GenerateDeclaration( CodeTypeReference type, string name, CodeExpression initExpression )
- {
- TextWriter output = Output;
-
- OutputTypeNamePair( type, GetSafeName (name) );
-
- if ( initExpression != null ) {
- output.Write( " = " );
- GenerateExpression( initExpression );
- }
-
- output.WriteLine( ';' );
- }
-
- private void GenerateMemberReferenceExpression( CodeExpression targetObject, string memberName )
- {
- if (targetObject != null ) {
- GenerateExpression( targetObject );
- Output.Write( '.' );
- }
- Output.Write( GetSafeName (memberName) );
- }
-
protected override void GenerateParameterDeclarationExpression (CodeParameterDeclarationExpression e)
{
if (e.CustomAttributes != null && e.CustomAttributes.Count > 0)
return mySBuilder.ToString();\r
}\r
\r
- private void GenerateDeclaration (CodeTypeReference type, string name, CodeExpression initExpression)\r
- {\r
- TextWriter output = Output;\r
-\r
- OutputTypeNamePair (type, name);\r
-\r
- if (initExpression != null) {\r
- output.Write (" = ");\r
- GenerateExpression (initExpression);\r
- }\r
-\r
- output.WriteLine ();\r
- }\r
- \r
private void GenerateMemberReferenceExpression (CodeExpression targetObject, string memberName)\r
{\r
GenerateExpression (targetObject);\r
\r
namespace System.Collections.Specialized {\r
public class StringEnumerator {\r
- private StringCollection coll;\r
private IEnumerator enumerable;\r
\r
// assembly-scoped constructor\r
internal StringEnumerator(StringCollection coll) {\r
- this.coll = coll;\r
this.enumerable = ((IEnumerable)coll).GetEnumerator();\r
}\r
\r
ListChangedType changedType;
int oldIndex;
int newIndex;
- PropertyDescriptor propDesc; // What to do with this?
+ //PropertyDescriptor propDesc; // What to do with this?
public ListChangedEventArgs (ListChangedType listChangedType,
int newIndex)
PropertyDescriptor propDesc)
{
this.changedType = listChangedType;
- this.propDesc = propDesc;
+ //this.propDesc = propDesc;
}
public ListChangedEventArgs (ListChangedType listChangedType,
internal class ReflectionPropertyDescriptor : PropertyDescriptor
{
PropertyInfo _member;
- Type _type;
Type _componentType;
public ReflectionPropertyDescriptor (Type componentType, PropertyDescriptor oldPropertyDescriptor, Attribute [] attributes)
: base (oldPropertyDescriptor, attributes)
{
- _type = oldPropertyDescriptor.PropertyType;
_componentType = componentType;
}
public ReflectionPropertyDescriptor (Type componentType, string name, Type type, Attribute [] attributes)
: base (name, attributes)
{
- _type = type;
_componentType = componentType;
}
case "add":
name = GetAttribute (attributes, "name", true, child);
value = GetAttribute (attributes, "value", true, child);
- value = AsString (value);
- ValidateIntegralValue (name, value);
+ value = AsString (value); ValidateIntegralValue (name, value);
newNodes [name] = value;
break;
case "remove":
d [node.Name] = newNodes;
}
- private static void ValidateIntegralValue (string name, string value)
+ private static int ValidateIntegralValue (string name, string value)
{
try {
- int n = int.Parse (value);
- // remove warning about unused variable.
- n = n;
- }
- catch {
+ return int.Parse (value);
+ } catch {
throw new ConfigurationException (string.Format (
"Error in '{0}': " +
"The value of a switch must be integral", name));
// The DiagnosticsConfigurationHandler assumes that the TraceImpl.Listeners
// collection exists (so it can initialize the DefaultTraceListener and
// add/remove existing listeners).
- private static void InitOnce ()
+ private static object InitOnce ()
{
+ object d = null;
#if !NO_LOCK_FREE
// The lock-free version
if (listeners == null) {
Thread.MemoryBarrier ();
while (Interlocked.CompareExchange (ref listeners, c, null) == null) {
// Read in the .config file and get the ball rolling...
- System.Collections.IDictionary d = DiagnosticsConfiguration.Settings;
-
- // remove warning about unused temporary
- d = d;
+ d = DiagnosticsConfiguration.Settings;
}
Thread.MemoryBarrier ();
}
lock (lock_) {
if (listeners == null) {
listeners = new TraceListenerCollection ();
-
// Read in the .config file and get the ball rolling...
- System.Collections.IDictionary d = DiagnosticsConfiguration.Settings;
-
- // remove warning about unused temporary
- d = d;
+ d = DiagnosticsConfiguration.Settings;
}
}
#endif
+ return d;
}
// FIXME: According to MSDN, this method should display a dialog box
namespace System.IO {
struct FAMConnection {
public int FD;
- IntPtr opaque;
+ public IntPtr opaque;
}
struct FAMRequest {
}
}
+ ~FAMWatcher ()
+ {
+ FAMClose (ref conn);
+ }
+
[DllImport ("libfam.so.0")]
extern static int FAMOpen (out FAMConnection fc);
string name = child.Name;
if (name == "proxy") {
- string deflt = HandlersUtil.ExtractAttributeValue ("usesystemdefault", child, true);
+ // ignored
+ HandlersUtil.ExtractAttributeValue ("usesystemdefault", child, true);
string bypass = HandlersUtil.ExtractAttributeValue ("bypassonlocal", child, true);
string address = HandlersUtil.ExtractAttributeValue ("proxyaddress", child, true);
if (child.Attributes != null && child.Attributes.Count != 0) {
{
/* Same structure in the runtime */
public Socket Sock;
- IntPtr handle;
+ public IntPtr handle;
object state;
AsyncCallback callback;
WaitHandle waithandle;
bool completed_sync;
bool completed;
- bool blocking;
+ public bool blocking;
internal int error;
SocketOperation operation;
- object ares;
+ public object ares;
public SocketAsyncResult (Socket sock, object state, AsyncCallback callback, SocketOperation operation)
{
public void GetSocketOption(SocketOptionLevel level,
SocketOptionName name,
byte[] opt_value) {
- int opt_value_len=opt_value.Length;
int error;
GetSocketOption_arr_internal(socket, level, name,
int version;
static char [] reservedCharsName = new char [] {' ', '=', ';', ',', '\n', '\r', '\t'};
- static char [] reservedCharsValue = new char [] {';', ','};
static char [] portSeparators = new char [] {'"', ','};
static string tspecials = "()<>@,;:\\\"/[]?={} \t"; // from RFC 2965, 2068
int length;
int pos;
static string [] keywords = { "realm", "opaque", "nonce", "algorithm", "qop" };
- static char [] endSeparator = new char[] { '"', ',' };
string [] values = new string [keywords.Length];
public DigestHeaderParser (string header)
pos--;
}
- void SkipNonWhitespace ()
- {
- char c = 'a';
- while (pos < length && c != ' ' && c != '\t' && c != '\r' && c != '\n') {
- c = header [pos++];
- }
- pos--;
- }
-
string GetKey ()
{
SkipWhitespace ();
port = (((int)sockaddr[2])<<8) + (int)sockaddr[3];
/// maybe flowid ?
+ /*
int unknown = (int)sockaddr[4] +
(((int)sockaddr[5])<<8) +
(((int)sockaddr[6])<<16) +
(((int)sockaddr[7])<<24);
+ */
int scopeId = (int)sockaddr[24] +
(((int)sockaddr[25])<<8) +
IAsyncResult innerAsyncResult;
bool callbackDone;
Exception exc;
- HttpWebRequest request;
HttpWebResponse response;
Stream writeStream;
byte [] buffer;
public WebAsyncResult (HttpWebRequest request, AsyncCallback cb, object state)
{
- this.request = request;
this.cb = cb;
this.state = state;
}
{
callbackDone = false;
exc = null;
- request = null;
response = null;
writeStream = null;
exc = null;
Socket socket;
object socketLock = new object ();
WebExceptionStatus status;
- WebConnectionGroup group;
bool busy;
WaitOrTimerCallback initConn;
bool keepAlive;
public WebConnection (WebConnectionGroup group, ServicePoint sPoint)
{
- this.group = group;
this.sPoint = sPoint;
buffer = new byte [4096];
readState = ReadState.None;
this.group_count = program[1] + 1;
this.match_min = program[2];
- this.match_max = program[3];
+ //this.match_max = program[3];
// setup
private string text; // input text
private int text_end; // end of input text (last character + 1)
private int group_count; // number of capturing groups
- private int match_min, match_max; // match width information
+ private int match_min;//, match_max; // match width information
private QuickSearch qs; // fast substring matcher
// match state
return Parser.ParseNumber (pattern, ref ptr, b, min, max);
}
- private int ParseDecimal () {
- return Parser.ParseDecimal (pattern, ref ptr);
- }
-
private static int ParseDigit (char c, int b, int n) {
switch (b) {
case 8:
return (options & RegexOptions.IgnorePatternWhitespace) != 0;
}
- private static bool IsRightToLeft (RegexOptions options) {
- return (options & RegexOptions.RightToLeft) != 0;
- }
-
private static bool IsECMAScript (RegexOptions options) {
return (options & RegexOptions.ECMAScript) != 0;
}
\r
return builder.ToString ();\r
}\r
-\r
- private string EncodeUtf8 (string str)\r
- {\r
- byte [] data = Encoding.UTF8.GetBytes (str);\r
- int len = data.Length;\r
- char [] res = new char [len];\r
-\r
- for (int i=0; i<len; i++)\r
- res [i] = (char) data [i];\r
-\r
- return new string (res);\r
- }\r
} \r
} \r
\r