[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Security SecurityEleme
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Security SecurityElement.cs, 1.7, 1.8 |
Date: |
Thu, 24 Jul 2003 01:02:47 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Security
In directory subversions:/tmp/cvs-serv18392/runtime/System/Security
Modified Files:
SecurityElement.cs
Log Message:
Implement a file-based registry provider for non-Win32 systems;
the data is stored under the "$HOME/.cli/registry" directory.
Index: SecurityElement.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Security/SecurityElement.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** SecurityElement.cs 23 Jul 2003 04:57:31 -0000 1.7
--- SecurityElement.cs 24 Jul 2003 05:02:44 -0000 1.8
***************
*** 443,446 ****
--- 443,491 ----
}
+ // Set an attribute within this element.
+ internal void SetAttribute(String name, String value)
+ {
+ // Validate the parameters.
+ if(name == null)
+ {
+ throw new ArgumentNullException("name");
+ }
+ if(value == null)
+ {
+ throw new
ArgumentNullException("value");
+ }
+ if(!IsValidAttributeName(name))
+ {
+ throw new ArgumentException
+ (_("Arg_InvalidXMLAttrName"));
+ }
+ if(!IsValidAttributeValue(value))
+ {
+ throw new ArgumentException
+ (_("Arg_InvalidXMLAttrValue"));
+ }
+
+ // Search for an attribute with the same name.
+ if(attributes != null)
+ {
+ int posn;
+ for(posn = 0; posn < attributes.Count;
++posn)
+ {
+
if(((AttrNameValue)(attributes[posn])).name == name)
+ {
+
((AttrNameValue)(attributes[posn])).value = value;
+ return;
+ }
+ }
+ }
+ else
+ {
+ attributes = new ArrayList();
+ }
+
+ // Add the new attribute.
+ attributes.Add(new AttrNameValue(name, value));
+ }
+
// Add a child to this element.
public void AddChild(SecurityElement child)
***************
*** 616,620 ****
{
// The element has no contents, so use
the short-cut syntax.
! result += "/>";
}
else
--- 661,665 ----
{
// The element has no contents, so use
the short-cut syntax.
! result += "/>" + Environment.NewLine;
}
else
***************
*** 626,629 ****
--- 671,678 ----
result += Escape(text);
}
+ else
+ {
+ result += Environment.NewLine;
+ }
if(children != null)
{
***************
*** 634,638 ****
}
}
! result += "</" + tag + ">";
}
return result;
--- 683,687 ----
}
}
! result += "</" + tag + ">" +
Environment.NewLine;
}
return result;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Security SecurityElement.cs, 1.7, 1.8,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/Microsoft/Win32 FileKeyProvider.cs, NONE, 1.1 Registry.cs, 1.3, 1.4
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.2609,1.2610
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/Microsoft/Win32 FileKeyProvider.cs, NONE, 1.1 Registry.cs, 1.3, 1.4
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.2609,1.2610
- Index(es):