# building with monolite
mcslib = $(mcs_topdir)/class/lib
monolite = $(mcslib)/monolite
-mono_corlib_version = $(shell sed -n "s/\#define MONO_CORLIB_VERSION //p" $(srcdir)/mono/metadata/appdomain.c)
-monolite_url = http://download.mono-project.com/monolite/monolite-$(mono_corlib_version)-latest.tar.gz
+monolite_url = https://download.mono-project.com/monolite/monolite-$(MONO_CORLIB_VERSION)-latest.tar.gz
.PHONY: get-monolite-latest
get-monolite-latest:
-rm -fr $(mcslib)/monolite-*
-mkdir -p $(mcslib)
test ! -d $(monolite) || test ! -d $(monolite).old || rm -fr $(monolite).old
test ! -d $(monolite) || mv -f $(monolite) $(monolite).old
- cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
+ cd $(mcslib) && { (wget -O- $(monolite_url) || curl -L $(monolite_url)) | gzip -d | tar xf - ; }
cd $(mcslib) && mv -f monolite-* monolite
if BITCODE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+MONO_VERSION_MAJOR=`echo $VERSION | cut -d . -f 1`
+MONO_VERSION_MINOR=`echo $VERSION | cut -d . -f 2`
+MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
+
+# This is the version number of the corlib-runtime interface. When
+# making changes to this interface (by changing the layout
+# of classes the runtime knows about, changing icall signature or
+# semantics etc), increment this variable.
+#
+# This can be reset to 0 when Mono's version number is bumped
+# since it's part of the corlib version (the prefix '1' in the full
+# version number is to ensure the number isn't treated as octal in C)
+MONO_CORLIB_COUNTER=0
+MONO_CORLIB_VERSION=`printf "1%02d%02d%02d%03d" $MONO_VERSION_MAJOR $MONO_VERSION_MINOR $MONO_VERSION_BUILD $MONO_CORLIB_COUNTER`
+
+AC_DEFINE_UNQUOTED(MONO_CORLIB_VERSION,$MONO_CORLIB_VERSION,[Version of the corlib-runtime interface])
+AC_SUBST(MONO_CORLIB_VERSION)
+
case $host_os in
*cygwin* )
echo "Run configure using ./configure --host=i686-pc-mingw32"
}')]
echo "MONO_VERSION = $myver" >> $mcs_topdir/build/config.make
+ echo "MONO_CORLIB_VERSION = $MONO_CORLIB_VERSION" >> $mcs_topdir/build/config.make
if test x$host_darwin = xyes; then
echo "PLATFORM = darwin" >> $mcs_topdir/build/config.make
-Subproject commit e4deabf61c11999f200dcea6f6d6b42474cc2131
+Subproject commit 88b67c42ca8b7d58141c176b46749819bfcef166
common/Consts.cs: common/Consts.cs.in $(wildcard config.make)
test -n '$(MONO_VERSION)'
- sed -e 's,@''MONO_VERSION@,$(MONO_VERSION),' $< > $@
+ test -n '$(MONO_CORLIB_VERSION)'
+ sed -e 's,@''MONO_VERSION@,$(MONO_VERSION),' -e 's,@''MONO_CORLIB_VERSION@,$(MONO_CORLIB_VERSION),' $< > $@
PLATFORMS = darwin linux win32
PROFILES = \
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";
+ public const int MonoCorlibVersion = @MONO_CORLIB_VERSION@;
#if MOBILE
// Versions of .NET Framework for Silverlight 4.0
/lib
/compat/
+monolite-*.tar.gz
dist-monolite: $(monolite_files) lib/$(monolite_dir)/mcs.exe
+package-monolite-latest:
+ MONOLITE=monolite-$(MONO_CORLIB_VERSION)-latest; \
+ $(MAKE) dist-monolite monolite_dir=$$MONOLITE; \
+ tar zcvpf $$MONOLITE.tar.gz --directory=lib $$MONOLITE/
+
dist-default: dist-monolite
dist-local: dist-default
yield return kvp.Value;
}
- public void RemoveProperty (BuildProperty propertyToRemove)
+ public void RemoveProperty (BuildProperty property)
{
- if (propertyToRemove == null)
- throw new ArgumentNullException ("propertyToRemove");
+ if (property == null)
+ throw new ArgumentNullException ("property");
if (FromXml) {
- if (!propertyToRemove.FromXml)
+ if (!property.FromXml)
throw new InvalidOperationException ("The specified property does not belong to the current property group.");
- propertyToRemove.XmlElement.ParentNode.RemoveChild (propertyToRemove.XmlElement);
- properties.Remove (propertyToRemove);
+ property.XmlElement.ParentNode.RemoveChild (property.XmlElement);
+ properties.Remove (property);
} else
- propertiesByName.Remove (propertyToRemove.Name);
+ propertiesByName.Remove (property.Name);
}
public void RemoveProperty (string propertyName)
return build_records.GetOrAdd (key, _ => new BuildRecord (this));
}
- public void BuildStartedHandler (object sender, BuildStartedEventArgs args)
+ public void BuildStartedHandler (object sender, BuildStartedEventArgs e)
{
- GetBuildRecord (sender).BuildStartedHandler (sender, args);
+ GetBuildRecord (sender).BuildStartedHandler (sender, e);
}
- public void BuildFinishedHandler (object sender, BuildFinishedEventArgs args)
+ public void BuildFinishedHandler (object sender, BuildFinishedEventArgs e)
{
- GetBuildRecord (sender).BuildFinishedHandler (args);
+ GetBuildRecord (sender).BuildFinishedHandler (e);
((IDictionary) build_records).Remove (sender);
}
{
GetBuildRecord (sender).PopEvent (args);
}
- public void ProjectStartedHandler (object sender, ProjectStartedEventArgs args)
+ public void ProjectStartedHandler (object sender, ProjectStartedEventArgs e)
{
- GetBuildRecord (sender).ProjectStartedHandler (args);
+ GetBuildRecord (sender).ProjectStartedHandler (e);
}
- public void ProjectFinishedHandler (object sender, ProjectFinishedEventArgs args)
+ public void ProjectFinishedHandler (object sender, ProjectFinishedEventArgs e)
{
- GetBuildRecord (sender).ProjectFinishedHandler (args);
+ GetBuildRecord (sender).ProjectFinishedHandler (e);
}
- public void TargetStartedHandler (object sender, TargetStartedEventArgs args)
+ public void TargetStartedHandler (object sender, TargetStartedEventArgs e)
{
- GetBuildRecord (sender).TargetStartedHandler (args);
+ GetBuildRecord (sender).TargetStartedHandler (e);
}
- public void TargetFinishedHandler (object sender, TargetFinishedEventArgs args)
+ public void TargetFinishedHandler (object sender, TargetFinishedEventArgs e)
{
- GetBuildRecord (sender).TargetFinishedHandler (args);
+ GetBuildRecord (sender).TargetFinishedHandler (e);
}
- public void TaskStartedHandler (object sender, TaskStartedEventArgs args)
+ public void TaskStartedHandler (object sender, TaskStartedEventArgs e)
{
- GetBuildRecord (sender).TaskStartedHandler (args);
+ GetBuildRecord (sender).TaskStartedHandler (e);
}
- public void TaskFinishedHandler (object sender, TaskFinishedEventArgs args)
+ public void TaskFinishedHandler (object sender, TaskFinishedEventArgs e)
{
- GetBuildRecord (sender).TaskFinishedHandler (args);
+ GetBuildRecord (sender).TaskFinishedHandler (e);
}
- public void MessageHandler (object sender, BuildMessageEventArgs args)
+ public void MessageHandler (object sender, BuildMessageEventArgs e)
{
- GetBuildRecord (sender).MessageHandler (args);
+ GetBuildRecord (sender).MessageHandler (e);
}
- public void WarningHandler (object sender, BuildWarningEventArgs args)
+ public void WarningHandler (object sender, BuildWarningEventArgs e)
{
- GetBuildRecord (sender).WarningHandler (args);
+ GetBuildRecord (sender).WarningHandler (e);
}
- public void ErrorHandler (object sender, BuildErrorEventArgs args)
+ public void ErrorHandler (object sender, BuildErrorEventArgs e)
{
- GetBuildRecord (sender).ErrorHandler (args);
+ GetBuildRecord (sender).ErrorHandler (e);
}
[MonoTODO]
- public void CustomEventHandler (object sender, CustomBuildEventArgs args)
+ public void CustomEventHandler (object sender, CustomBuildEventArgs e)
{
- build_records [sender].CustomHandler (args);
+ build_records [sender].CustomHandler (e);
}
void SetColor (ConsoleColor color)
}
[MonoTODO ("Not tested")]
- public void AddNewImport (string importLocation,
- string importCondition)
+ public void AddNewImport (string projectFile,
+ string condition)
{
- if (importLocation == null)
- throw new ArgumentNullException ("importLocation");
+ if (projectFile == null)
+ throw new ArgumentNullException ("projectFile");
XmlElement importElement = xmlDocument.CreateElement ("Import", XmlNamespace);
xmlDocument.DocumentElement.AppendChild (importElement);
- importElement.SetAttribute ("Project", importLocation);
- if (!String.IsNullOrEmpty (importCondition))
- importElement.SetAttribute ("Condition", importCondition);
+ importElement.SetAttribute ("Project", projectFile);
+ if (!String.IsNullOrEmpty (condition))
+ importElement.SetAttribute ("Condition", condition);
AddImport (importElement, null, false);
MarkProjectAsDirty ();
Load (projectFileName, ProjectLoadSettings.None);
}
- public void Load (string projectFileName, ProjectLoadSettings settings)
+ public void Load (string projectFileName, ProjectLoadSettings projectLoadSettings)
{
- project_load_settings = settings;
+ project_load_settings = projectLoadSettings;
if (String.IsNullOrEmpty (projectFileName))
throw new ArgumentNullException ("projectFileName");
[MonoTODO]
// NOTE: does not modify imported projects
- public void RemoveItemGroupsWithMatchingCondition (string matchingCondition)
+ public void RemoveItemGroupsWithMatchingCondition (string matchCondition)
{
throw new NotImplementedException ();
}
isDirty = false;
}
- public void Save (TextWriter outTextWriter)
+ public void Save (TextWriter textWriter)
{
- xmlDocument.Save (outTextWriter);
+ xmlDocument.Save (textWriter);
isDirty = false;
}
throw new NotImplementedException ();
}
- public void SetProjectExtensions (string id, string xmlText)
+ public void SetProjectExtensions (string id, string content)
{
if (id == null)
throw new ArgumentNullException ("id");
- if (xmlText == null)
- throw new ArgumentNullException ("xmlText");
+ if (content == null)
+ throw new ArgumentNullException ("content");
XmlNode projectExtensions, node;
xmlDocument.DocumentElement.AppendChild (projectExtensions);
node = xmlDocument.CreateElement (id, XmlNamespace);
- node.InnerXml = xmlText;
+ node.InnerXml = content;
projectExtensions.AppendChild (node);
} else {
node = xmlDocument.SelectSingleNode (String.Format ("/tns:Project/tns:ProjectExtensions/tns:{0}", id), XmlNamespaceManager);
projectExtensions.AppendChild (node);
}
- node.InnerXml = xmlText;
+ node.InnerXml = content;
}
}
// FIXME: shouldn't we remove it from XML?
- public void RemoveTask (BuildTask buildTask)
+ public void RemoveTask (BuildTask taskElement)
{
- if (buildTask == null)
- throw new ArgumentNullException ("buildTask");
- buildTasks.Remove (buildTask);
+ if (taskElement == null)
+ throw new ArgumentNullException ("taskElement");
+ buildTasks.Remove (taskElement);
}
bool Build ()
get { return Line == 0 ? File : String.Format ("{0} ({1}{2})", File, Line, Column != 0 ? "," + Column : String.Empty); }
}
- public override bool Equals (object other)
+ public override bool Equals (object obj)
{
- var o = other as ElementLocation;
+ var o = obj as ElementLocation;
return (object) o != null && o.File == File && o.Line == Line && o.Column == Column;
}
+ "{data.Items.Count} #Targets={data.Targets.Count}")]
public class Project
{
- public Project (XmlReader xml)
- : this (ProjectRootElement.Create (xml))
+ public Project (XmlReader xmlReader)
+ : this (ProjectRootElement.Create (xmlReader))
{
}
- public Project (XmlReader xml, IDictionary<string, string> globalProperties,
+ public Project (XmlReader xmlReader, IDictionary<string, string> globalProperties,
string toolsVersion)
- : this (ProjectRootElement.Create (xml), globalProperties, toolsVersion)
+ : this (ProjectRootElement.Create (xmlReader), globalProperties, toolsVersion)
{
}
- public Project (XmlReader xml, IDictionary<string, string> globalProperties,
+ public Project (XmlReader xmlReader, IDictionary<string, string> globalProperties,
string toolsVersion, ProjectCollection projectCollection)
- : this (ProjectRootElement.Create (xml), globalProperties, toolsVersion, projectCollection)
+ : this (ProjectRootElement.Create (xmlReader), globalProperties, toolsVersion, projectCollection)
{
}
- public Project (XmlReader xml, IDictionary<string, string> globalProperties,
+ public Project (XmlReader xmlReader, IDictionary<string, string> globalProperties,
string toolsVersion, ProjectCollection projectCollection,
ProjectLoadSettings loadSettings)
- : this (ProjectRootElement.Create (xml), globalProperties, toolsVersion, projectCollection, loadSettings)
+ : this (ProjectRootElement.Create (xmlReader), globalProperties, toolsVersion, projectCollection, loadSettings)
{
}
{
public class ProjectCollection : IDisposable
{
- public delegate void ProjectAddedEventHandler (object target, ProjectAddedToProjectCollectionEventArgs args);
+ public delegate void ProjectAddedEventHandler (object sender, ProjectAddedToProjectCollectionEventArgs e);
public class ProjectAddedToProjectCollectionEventArgs : EventArgs
{
- public ProjectAddedToProjectCollectionEventArgs (ProjectRootElement project)
+ public ProjectAddedToProjectCollectionEventArgs (ProjectRootElement element)
{
- if (project == null)
+ if (element == null)
throw new ArgumentNullException ("project");
- ProjectRootElement = project;
+ ProjectRootElement = element;
}
public ProjectRootElement ProjectRootElement { get; private set; }
{
}
- public ProjectCollection (ToolsetDefinitionLocations toolsetDefinitionLocations)
- : this (null, null, toolsetDefinitionLocations)
+ public ProjectCollection (ToolsetDefinitionLocations toolsetLocations)
+ : this (null, null, toolsetLocations)
{
}
namespace Mono.Simd
{
+ [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 16)]
public struct Vector16b
{
namespace Mono.Simd
{
+ [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 16)]
[CLSCompliant(false)]
public struct Vector16sb
namespace Mono.Simd
{
-
+ [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
[StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
public struct Vector2d
{
namespace Mono.Simd
{
+ [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
[StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
public struct Vector2l
{
namespace Mono.Simd
{
+ [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
[StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
[CLSCompliant(false)]
public struct Vector2ul
Replace Shuffle with less bug prone methods
*/
+ [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
[StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
public struct Vector4f
{
namespace Mono.Simd
{
+ [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
[StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
public struct Vector4i
{
namespace Mono.Simd
{
+ [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
[StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
[CLSCompliant(false)]
public struct Vector4ui
namespace Mono.Simd
{
+ [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
[StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
public struct Vector8s
{
namespace Mono.Simd
{
+ [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
[StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
[CLSCompliant(false)]
public struct Vector8us
Novell.Directory.Ldap/AssemblyInfo.cs
-../../build/common/Consts.cs.in
+../../build/common/Consts.cs
Novell.Directory.Ldap/SupportClass.cs
Novell.Directory.Ldap.Utilclass/Base64.cs
Novell.Directory.Ldap.Utilclass/DN.cs
return host.CreateDeprecatedConfigContext (configPath);
}
- public virtual string DecryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedSection)
+ public virtual string DecryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection)
{
- return host.DecryptSection (encryptedXml, protectionProvider, protectedSection);
+ return host.DecryptSection (encryptedXml, protectionProvider, protectedConfigSection);
}
public virtual void DeleteStream (string streamName)
host.DeleteStream (streamName);
}
- public virtual string EncryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedSection)
+ public virtual string EncryptSection (string clearTextXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection)
{
- return host.EncryptSection (encryptedXml, protectionProvider, protectedSection);
+ return host.EncryptSection (clearTextXml, protectionProvider, protectedConfigSection);
}
- public virtual string GetConfigPathFromLocationSubPath (string configPath, string locatinSubPath)
+ public virtual string GetConfigPathFromLocationSubPath (string configPath, string locationSubPath)
{
- return host.GetConfigPathFromLocationSubPath (configPath, locatinSubPath);
+ return host.GetConfigPathFromLocationSubPath (configPath, locationSubPath);
}
public virtual Type GetConfigType (string typeName, bool throwOnError)
return host.Impersonate ();
}
- public virtual void Init (IInternalConfigRoot root, params object[] hostInitParams)
+ public virtual void Init (IInternalConfigRoot configRoot, params object[] hostInitParams)
{
- host.Init (root, hostInitParams);
+ host.Init (configRoot, hostInitParams);
}
- public virtual void InitForConfiguration (ref string locationSubPath, out string configPath, out string locationConfigPath, IInternalConfigRoot root, params object[] hostInitConfigurationParams)
+ public virtual void InitForConfiguration (ref string locationSubPath, out string configPath, out string locationConfigPath, IInternalConfigRoot configRoot, params object[] hostInitConfigurationParams)
{
- host.InitForConfiguration (ref locationSubPath, out configPath, out locationConfigPath, root, hostInitConfigurationParams);
+ host.InitForConfiguration (ref locationSubPath, out configPath, out locationConfigPath, configRoot, hostInitConfigurationParams);
}
public virtual bool IsAboveApplication (string configPath)
{
object CreateConfigurationContext (string configPath, string locationSubPath);
object CreateDeprecatedConfigContext (string configPath);
- string DecryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedSection);
+ string DecryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection);
void DeleteStream (string streamName);
- string EncryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedSection);
- string GetConfigPathFromLocationSubPath (string configPath, string locatinSubPath);
+ string EncryptSection (string clearTextXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection);
+ string GetConfigPathFromLocationSubPath (string configPath, string locationSubPath);
Type GetConfigType (string typeName, bool throwOnError);
string GetConfigTypeName (Type t);
void GetRestrictedPermissions (IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady);
string GetStreamNameForConfigSource (string streamName, string configSource);
object GetStreamVersion (string streamName);
IDisposable Impersonate ();
- void Init (IInternalConfigRoot root, params object[] hostInitParams);
- void InitForConfiguration (ref string locationSubPath, out string configPath, out string locationConfigPath, IInternalConfigRoot root, params object[] hostInitConfigurationParams);
+ void Init (IInternalConfigRoot configRoot, params object[] hostInitParams);
+ void InitForConfiguration (ref string locationSubPath, out string configPath, out string locationConfigPath, IInternalConfigRoot configRoot, params object[] hostInitConfigurationParams);
bool IsAboveApplication (string configPath);
bool IsConfigRecordRequired (string configPath);
bool IsDefinitionAllowed (string configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition);
[MonoTODO]
protected internal override string SerializeSection (
- ConfigurationElement parent, string name, ConfigurationSaveMode mode)
+ ConfigurationElement parentElement, string name, ConfigurationSaveMode saveMode)
{
if (File == "") {
- return base.SerializeSection (parent, name, mode);
+ return base.SerializeSection (parentElement, name, saveMode);
}
else {
throw new NotImplementedException ();
get { return RootSectionGroup.Sections; }
}
- public ConfigurationSection GetSection (string path)
+ public ConfigurationSection GetSection (string sectionName)
{
- string[] parts = path.Split ('/');
+ string[] parts = sectionName.Split ('/');
if (parts.Length == 1)
return Sections [parts[0]];
return null;
}
- public ConfigurationSectionGroup GetSectionGroup (string path)
+ public ConfigurationSectionGroup GetSectionGroup (string sectionGroupName)
{
- string[] parts = path.Split ('/');
+ string[] parts = sectionGroupName.Split ('/');
ConfigurationSectionGroup group = SectionGroups [parts[0]];
for (int n=1; group != null && n<parts.Length; n++)
group = group.SectionGroups [parts [n]];
Save (ConfigurationSaveMode.Modified, false);
}
- public void Save (ConfigurationSaveMode mode)
+ public void Save (ConfigurationSaveMode saveMode)
{
- Save (mode, false);
+ Save (saveMode, false);
}
- public void Save (ConfigurationSaveMode mode, bool forceUpdateAll)
+ public void Save (ConfigurationSaveMode saveMode, bool forceSaveAll)
{
- if (!forceUpdateAll && (mode != ConfigurationSaveMode.Full) && !HasValues (mode)) {
+ if (!forceSaveAll && (saveMode != ConfigurationSaveMode.Full) && !HasValues (saveMode)) {
ResetModified ();
return;
}
if (saveStart != null)
saveStart (this, new ConfigurationSaveEventArgs (streamName, true, null, ctx));
- Save (stream, mode, forceUpdateAll);
+ Save (stream, saveMode, forceSaveAll);
system.Host.WriteCompleted (streamName, true, ctx);
} catch (Exception ex) {
saveEx = ex;
SaveAs (filename, ConfigurationSaveMode.Modified, false);
}
- public void SaveAs (string filename, ConfigurationSaveMode mode)
+ public void SaveAs (string filename, ConfigurationSaveMode saveMode)
{
- SaveAs (filename, mode, false);
+ SaveAs (filename, saveMode, false);
}
[MonoInternalNote ("Detect if file has changed")]
- public void SaveAs (string filename, ConfigurationSaveMode mode, bool forceUpdateAll)
+ public void SaveAs (string filename, ConfigurationSaveMode saveMode, bool forceSaveAll)
{
- if (!forceUpdateAll && (mode != ConfigurationSaveMode.Full) && !HasValues (mode)) {
+ if (!forceSaveAll && (saveMode != ConfigurationSaveMode.Full) && !HasValues (saveMode)) {
ResetModified ();
return;
}
string dir = Path.GetDirectoryName (Path.GetFullPath (filename));
if (!Directory.Exists (dir))
Directory.CreateDirectory (dir);
- Save (new FileStream (filename, FileMode.OpenOrCreate, FileAccess.Write), mode, forceUpdateAll);
+ Save (new FileStream (filename, FileMode.OpenOrCreate, FileAccess.Write), saveMode, forceSaveAll);
}
void Save (Stream stream, ConfigurationSaveMode mode, bool forceUpdateAll)
}
[MonoTODO]
- protected virtual void ListErrors (IList list)
+ protected virtual void ListErrors (IList errorList)
{
throw new NotImplementedException ();
}
return defaultCollection;
}
- protected internal object this [ConfigurationProperty property] {
- get { return this [property.Name]; }
- set { this [property.Name] = value; }
+ protected internal object this [ConfigurationProperty prop] {
+ get { return this [prop.Name]; }
+ set { this [prop.Name] = value; }
}
- protected internal object this [string property_name] {
+ protected internal object this [string propertyName] {
get {
- PropertyInformation pi = ElementInformation.Properties [property_name];
+ PropertyInformation pi = ElementInformation.Properties [propertyName];
if (pi == null)
- throw new InvalidOperationException ("Property '" + property_name + "' not found in configuration element");
+ throw new InvalidOperationException ("Property '" + propertyName + "' not found in configuration element");
return pi.Value;
}
set {
- PropertyInformation pi = ElementInformation.Properties [property_name];
+ PropertyInformation pi = ElementInformation.Properties [propertyName];
if (pi == null)
- throw new InvalidOperationException ("Property '" + property_name + "' not found in configuration element");
+ throw new InvalidOperationException ("Property '" + propertyName + "' not found in configuration element");
SetPropertyValue (pi.Property, value, false);
return false;
}
- protected virtual bool OnDeserializeUnrecognizedElement (string element, XmlReader reader)
+ protected virtual bool OnDeserializeUnrecognizedElement (string elementName, XmlReader reader)
{
return false;
}
}
protected internal virtual void Unmerge (
- ConfigurationElement source, ConfigurationElement parent,
- ConfigurationSaveMode updateMode)
+ ConfigurationElement sourceElement, ConfigurationElement parentElement,
+ ConfigurationSaveMode saveMode)
{
- if (parent != null && source.GetType() != parent.GetType())
+ if (parentElement != null && sourceElement.GetType() != parentElement.GetType())
throw new ConfigurationErrorsException ("Can't unmerge two elements of different type");
- bool isMinimalOrModified = updateMode == ConfigurationSaveMode.Minimal ||
- updateMode == ConfigurationSaveMode.Modified;
+ bool isMinimalOrModified = saveMode == ConfigurationSaveMode.Minimal ||
+ saveMode == ConfigurationSaveMode.Modified;
- foreach (PropertyInformation prop in source.ElementInformation.Properties)
+ foreach (PropertyInformation prop in sourceElement.ElementInformation.Properties)
{
if (prop.ValueOrigin == PropertyValueOrigin.Default)
continue;
PropertyInformation unmergedProp = ElementInformation.Properties [prop.Name];
object sourceValue = prop.Value;
- if (parent == null || !parent.HasValue (prop.Name)) {
+ if (parentElement == null || !parentElement.HasValue (prop.Name)) {
unmergedProp.Value = sourceValue;
continue;
}
if (sourceValue == null)
continue;
- object parentValue = parent [prop.Name];
+ object parentValue = parentElement [prop.Name];
if (!prop.IsElement) {
if (!object.Equals (sourceValue, parentValue) ||
- (updateMode == ConfigurationSaveMode.Full) ||
- (updateMode == ConfigurationSaveMode.Modified && prop.ValueOrigin == PropertyValueOrigin.SetHere))
+ (saveMode == ConfigurationSaveMode.Full) ||
+ (saveMode == ConfigurationSaveMode.Modified && prop.ValueOrigin == PropertyValueOrigin.SetHere))
unmergedProp.Value = sourceValue;
continue;
}
- var sourceElement = (ConfigurationElement) sourceValue;
- if (isMinimalOrModified && !sourceElement.IsModified ())
+ var sourceElementValue = (ConfigurationElement) sourceValue;
+ if (isMinimalOrModified && !sourceElementValue.IsModified ())
continue;
if (parentValue == null) {
unmergedProp.Value = sourceValue;
continue;
}
- var parentElement = (ConfigurationElement) parentValue;
+ var parentElementValue = (ConfigurationElement) parentValue;
ConfigurationElement copy = (ConfigurationElement) unmergedProp.Value;
- copy.Unmerge (sourceElement, parentElement, updateMode);
+ copy.Unmerge (sourceElementValue, parentElementValue, saveMode);
}
}
return false;
}
- protected internal override void Unmerge (ConfigurationElement sourceElement, ConfigurationElement parentElement, ConfigurationSaveMode updateMode)
+ protected internal override void Unmerge (ConfigurationElement sourceElement, ConfigurationElement parentElement, ConfigurationSaveMode saveMode)
{
ConfigurationElementCollection source = (ConfigurationElementCollection) sourceElement;
ConfigurationElementCollection parent = (ConfigurationElementCollection) parentElement;
object key = source.GetElementKey (sitem);
ConfigurationElement pitem = parent != null ? parent.BaseGet (key) as ConfigurationElement : null;
ConfigurationElement nitem = CreateNewElementInternal (null);
- if (pitem != null && updateMode != ConfigurationSaveMode.Full) {
- nitem.Unmerge (sitem, pitem, updateMode);
- if (nitem.HasValues (pitem, updateMode))
+ if (pitem != null && saveMode != ConfigurationSaveMode.Full) {
+ nitem.Unmerge (sitem, pitem, saveMode);
+ if (nitem.HasValues (pitem, saveMode))
BaseAdd (nitem);
} else {
nitem.Unmerge (sitem, null, ConfigurationSaveMode.Full);
}
}
- if (updateMode == ConfigurationSaveMode.Full)
+ if (saveMode == ConfigurationSaveMode.Full)
EmitClear = true;
else if (parent != null) {
for (int n=0; n<parent.Count; n++) {
: this (name, type, NoDefaultValue, TypeDescriptor.GetConverter (type), new DefaultValidator(), ConfigurationPropertyOptions.None, null)
{ }
- public ConfigurationProperty (string name, Type type, object default_value)
- : this (name, type, default_value, TypeDescriptor.GetConverter (type), new DefaultValidator(), ConfigurationPropertyOptions.None, null)
+ public ConfigurationProperty (string name, Type type, object defaultValue)
+ : this (name, type, defaultValue, TypeDescriptor.GetConverter (type), new DefaultValidator(), ConfigurationPropertyOptions.None, null)
{ }
public ConfigurationProperty (
- string name, Type type, object default_value,
- ConfigurationPropertyOptions flags)
- :this (name, type, default_value, TypeDescriptor.GetConverter (type), new DefaultValidator(), flags, null)
+ string name, Type type, object defaultValue,
+ ConfigurationPropertyOptions options)
+ :this (name, type, defaultValue, TypeDescriptor.GetConverter (type), new DefaultValidator(), options, null)
{ }
public ConfigurationProperty (
- string name, Type type, object default_value,
- TypeConverter converter,
- ConfigurationValidatorBase validation,
- ConfigurationPropertyOptions flags)
- : this (name, type, default_value, converter, validation, flags, null)
+ string name, Type type, object defaultValue,
+ TypeConverter typeConverter,
+ ConfigurationValidatorBase validator,
+ ConfigurationPropertyOptions options)
+ : this (name, type, defaultValue, typeConverter, validator, options, null)
{ }
public ConfigurationProperty (
- string name, Type type, object default_value,
- TypeConverter converter,
- ConfigurationValidatorBase validation,
- ConfigurationPropertyOptions flags,
+ string name, Type type, object defaultValue,
+ TypeConverter typeConverter,
+ ConfigurationValidatorBase validator,
+ ConfigurationPropertyOptions options,
string description)
{
this.name = name;
- this.converter = converter != null ? converter : TypeDescriptor.GetConverter (type);
- if (default_value != null) {
- if (default_value == NoDefaultValue) {
+ this.converter = typeConverter != null ? typeConverter : TypeDescriptor.GetConverter (type);
+ if (defaultValue != null) {
+ if (defaultValue == NoDefaultValue) {
switch (Type.GetTypeCode (type)) {
case TypeCode.Object:
- default_value = null;
+ defaultValue = null;
break;
case TypeCode.String:
- default_value = String.Empty;
+ defaultValue = String.Empty;
break;
default:
- default_value = Activator.CreateInstance (type);
+ defaultValue = Activator.CreateInstance (type);
break;
}
}
else
- if (!type.IsAssignableFrom (default_value.GetType ())) {
- if (!this.converter.CanConvertFrom (default_value.GetType ()))
+ if (!type.IsAssignableFrom (defaultValue.GetType ())) {
+ if (!this.converter.CanConvertFrom (defaultValue.GetType ()))
throw new ConfigurationErrorsException (String.Format ("The default value for property '{0}' has a different type than the one of the property itself: expected {1} but was {2}",
- name, type, default_value.GetType ()));
+ name, type, defaultValue.GetType ()));
- default_value = this.converter.ConvertFrom (default_value);
+ defaultValue = this.converter.ConvertFrom (defaultValue);
}
}
- this.default_value = default_value;
- this.flags = flags;
+ this.default_value = defaultValue;
+ this.flags = options;
this.type = type;
- this.validation = validation != null ? validation : new DefaultValidator ();
+ this.validation = validator != null ? validator : new DefaultValidator ();
this.description = description;
}
}
[MonoTODO]
- public void ForceDeclaration (bool require)
+ public void ForceDeclaration (bool force)
{
- this.require_declaration = require;
+ this.require_declaration = force;
}
public void ForceDeclaration ()
{
}
- public new ConnectionStringSettings this [string Name]
+ public new ConnectionStringSettings this [string name]
{
get {
foreach (ConfigurationElement c in this) {
if (!(c is ConnectionStringSettings))
continue;
- if (string.Compare(((ConnectionStringSettings) c).Name, Name, true,
+ if (string.Compare(((ConnectionStringSettings) c).Name, name, true,
System.Globalization.CultureInfo.InvariantCulture) == 0)
return c as ConnectionStringSettings;
Protection API, and is unimplemented in Mono. For portability's sake,
it is suggested that you use the RsaProtectedConfigurationProvider.";
[MonoNotSupported (NotSupportedReason)]
- public override XmlNode Decrypt (XmlNode encrypted_node)
+ public override XmlNode Decrypt (XmlNode encryptedNode)
{
throw new NotSupportedException (NotSupportedReason);
}
return false;
}
- protected internal override void DeserializeSection (XmlReader reader)
+ protected internal override void DeserializeSection (XmlReader xmlReader)
{
- xml = reader.ReadOuterXml ();
+ xml = xmlReader.ReadOuterXml ();
}
[MonoTODO]
- protected internal override void Reset (ConfigurationElement parentElement)
+ protected internal override void Reset (ConfigurationElement parentSection)
{
- base.Reset (parentElement);
+ base.Reset (parentSection);
}
[MonoTODO]
base.ResetModified ();
}
- protected internal override string SerializeSection (ConfigurationElement parentElement, string name, ConfigurationSaveMode saveMode)
+ protected internal override string SerializeSection (ConfigurationElement parentSection, string name, ConfigurationSaveMode saveMode)
{
return xml;
}
{
}
- public abstract XmlNode Decrypt (XmlNode encrypted_node);
+ public abstract XmlNode Decrypt (XmlNode encryptedNode);
public abstract XmlNode Encrypt (XmlNode node);
}
[MonoTODO]
protected internal override void Unmerge (
- ConfigurationElement source, ConfigurationElement parent,
- ConfigurationSaveMode updateMode)
+ ConfigurationElement sourceElement, ConfigurationElement parentElement,
+ ConfigurationSaveMode saveMode)
{
- base.Unmerge (source, parent, updateMode);
+ base.Unmerge (sourceElement, parentElement, saveMode);
}
[ConfigurationProperty ("name", Options = ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
return ((ProviderSettings)element).Name;
}
- public void Remove (string key)
+ public void Remove (string name)
{
- BaseRemove (key);
+ BaseRemove (name);
}
- public ProviderSettings this [int n]
+ public ProviderSettings this [int index]
{
- get { return (ProviderSettings) BaseGet (n); }
- set { BaseAdd (n, value); }
+ get { return (ProviderSettings) BaseGet (index); }
+ set { BaseAdd (index, value); }
}
public new ProviderSettings this [string key]
}
[MonoTODO]
- public override XmlNode Decrypt (XmlNode encrypted_node)
+ public override XmlNode Decrypt (XmlNode encryptedNode)
{
XmlDocument doc = new ConfigurationXmlDocument ();
- doc.Load (new StringReader (encrypted_node.OuterXml));
+ doc.Load (new StringReader (encryptedNode.OuterXml));
EncryptedXml ex = new EncryptedXml (doc);
return raw_xml;
}
- public void ProtectSection (string provider)
+ public void ProtectSection (string protectionProvider)
{
- protection_provider = ProtectedConfiguration.GetProvider (provider, true);
+ protection_provider = ProtectedConfiguration.GetProvider (protectionProvider, true);
}
[MonoTODO]
- public void ForceDeclaration (bool require)
+ public void ForceDeclaration (bool force)
{
}
protection_provider = null;
}
- public void SetRawXml (string xml)
+ public void SetRawXml (string rawXml)
{
- raw_xml = xml;
+ raw_xml = rawXml;
}
[MonoTODO]
using System.IO;
namespace System.Configuration {
- public delegate void ValidatorCallback (object o);
+ public delegate void ValidatorCallback (object value);
}
KeyValue = KeyBuilder.Key (KeySizeValue >> 3);
}
- public override ICryptoTransform CreateDecryptor (byte[] rgbKey, byte[] rgbIV)
+ public override ICryptoTransform CreateDecryptor (byte[] key, byte[] iv)
{
if ((Mode == CipherMode.CFB) && (FeedbackSize > 64))
throw new CryptographicException ("CFB with Feedbaack > 64 bits");
- return new AesTransform (this, false, rgbKey, rgbIV);
+ return new AesTransform (this, false, key, iv);
}
- public override ICryptoTransform CreateEncryptor (byte[] rgbKey, byte[] rgbIV)
+ public override ICryptoTransform CreateEncryptor (byte[] key, byte[] iv)
{
if ((Mode == CipherMode.CFB) && (FeedbackSize > 64))
throw new CryptographicException ("CFB with Feedbaack > 64 bits");
- return new AesTransform (this, true, rgbKey, rgbIV);
+ return new AesTransform (this, true, key, iv);
}
// I suppose some attributes differs ?!? because this does not look required
/// </summary>\r
/// <param name="connectionString">specifies file or server connection</param>\r
[DbLinqToDo]\r
- public DataContext(string connectionString)\r
+ public DataContext(string fileOrServerOrConnection)\r
{\r
Profiler.At("START DataContext(string)");\r
- IVendor ivendor = GetVendor(ref connectionString);\r
+ IVendor ivendor = GetVendor(ref fileOrServerOrConnection);\r
\r
- IDbConnection dbConnection = ivendor.CreateDbConnection(connectionString);\r
+ IDbConnection dbConnection = ivendor.CreateDbConnection(fileOrServerOrConnection);\r
Init(new DatabaseContext(dbConnection), null, ivendor);\r
\r
Profiler.At("END DataContext(string)");\r
-//
+//
// System.Data.OracleClient.OracleCommandBuilder.cs
//
// based on the SqlCommandBuilder in mcs/class/System.Data/System.Data.SqlClient
}
[MonoTODO]
- protected override void ApplyParameterInfo (DbParameter dbParameter,
- DataRow row,
+ protected override void ApplyParameterInfo (DbParameter parameter,
+ DataRow datarow,
StatementType statementType,
bool whereClause)
{
}
[MonoTODO]
- protected override string GetParameterName (int position)
+ protected override string GetParameterName (int parameterOrdinal)
{
throw new NotImplementedException ();
}
}
[MonoTODO]
- protected override string GetParameterPlaceholder (int position)
+ protected override string GetParameterPlaceholder (int parameterOrdinal)
{
throw new NotImplementedException ();
}
ConnectionString = connectionString;
}
- public SqlConnection (string connectionString, SqlCredential cred)
+ public SqlConnection (string connectionString, SqlCredential credential)
{
ConnectionString = connectionString;
- Credentials = cred;
+ Credentials = credential;
}
#endregion // Constructors
#region Constructors
- public SqlCredential (string user, SecureString password)
+ public SqlCredential (string userId, SecureString password)
{
- if (user == null)
- throw new ArgumentNullException("UserID");
+ if (userId == null)
+ throw new ArgumentNullException("userId");
if (password == null)
- throw new ArgumentNullException("Password");
- this.uid = user;
+ throw new ArgumentNullException("password");
+ this.uid = userId;
this.pwd = password;
}
Assembly/AssemblyInfo.cs
-../../build/common/Consts.cs.in
+../../build/common/Consts.cs
../../build/common/Locale.cs
../../build/common/SR.cs
../../build/common/MonoTODOAttribute.cs
}
public virtual CodeStatementCollection SerializeMember (IDesignerSerializationManager manager,
- object owningobject, MemberDescriptor member)
+ object owningObject, MemberDescriptor member)
{
if (member == null)
throw new ArgumentNullException ("member");
- if (owningobject == null)
- throw new ArgumentNullException ("owningobject");
+ if (owningObject == null)
+ throw new ArgumentNullException ("owningObject");
if (manager == null)
throw new ArgumentNullException ("manager");
CodeStatementCollection statements = new CodeStatementCollection ();
- CodeExpression expression = base.GetExpression (manager, owningobject);
+ CodeExpression expression = base.GetExpression (manager, owningObject);
if (expression == null) {
- string name = manager.GetName (owningobject);
+ string name = manager.GetName (owningObject);
if (name == null)
- name = base.GetUniqueName (manager, owningobject);
+ name = base.GetUniqueName (manager, owningObject);
expression = new CodeVariableReferenceExpression (name);
- base.SetExpression (manager, owningobject, expression);
+ base.SetExpression (manager, owningObject, expression);
}
if (member is PropertyDescriptor)
- base.SerializeProperty (manager, statements, owningobject, (PropertyDescriptor) member);
+ base.SerializeProperty (manager, statements, owningObject, (PropertyDescriptor) member);
if (member is EventDescriptor)
- base.SerializeEvent (manager, statements, owningobject, (EventDescriptor) member);
+ base.SerializeEvent (manager, statements, owningObject, (EventDescriptor) member);
return statements;
}
public virtual CodeStatementCollection SerializeMemberAbsolute (IDesignerSerializationManager manager,
- object owningobject, MemberDescriptor member)
+ object owningObject, MemberDescriptor member)
{
if (member == null)
throw new ArgumentNullException ("member");
- if (owningobject == null)
- throw new ArgumentNullException ("owningobject");
+ if (owningObject == null)
+ throw new ArgumentNullException ("owningObject");
if (manager == null)
throw new ArgumentNullException ("manager");
SerializeAbsoluteContext context = new SerializeAbsoluteContext (member);
manager.Context.Push (context);
- CodeStatementCollection result = this.SerializeMember (manager, owningobject, member);
+ CodeStatementCollection result = this.SerializeMember (manager, owningObject, member);
manager.Context.Pop ();
return result;
}
{
}
- protected CodeExpression SerializeToExpression (IDesignerSerializationManager manager, object instance)
+ protected CodeExpression SerializeToExpression (IDesignerSerializationManager manager, object value)
{
if (manager == null)
throw new ArgumentNullException ("manager");
CodeExpression expression = null;
- if (instance != null)
- expression = this.GetExpression (manager, instance); // 1 - IDesignerSerializationManager.GetExpression
+ if (value != null)
+ expression = this.GetExpression (manager, value); // 1 - IDesignerSerializationManager.GetExpression
if (expression == null) {
- CodeDomSerializer serializer = this.GetSerializer (manager, instance); // 2 - manager.GetSerializer().Serialize()
+ CodeDomSerializer serializer = this.GetSerializer (manager, value); // 2 - manager.GetSerializer().Serialize()
if (serializer != null) {
- object serialized = serializer.Serialize (manager, instance);
+ object serialized = serializer.Serialize (manager, value);
expression = serialized as CodeExpression; // 3 - CodeStatement or CodeStatementCollection
if (expression == null) {
CodeStatement statement = serialized as CodeStatement;
CodeStatementCollection contextStatements = null;
StatementContext context = manager.Context[typeof (StatementContext)] as StatementContext;
- if (context != null && instance != null)
- contextStatements = context.StatementCollection[instance];
+ if (context != null && value != null)
+ contextStatements = context.StatementCollection[value];
if (contextStatements == null)
contextStatements = manager.Context[typeof (CodeStatementCollection)] as CodeStatementCollection;
}
}
}
- if (expression == null && instance != null)
- expression = this.GetExpression (manager, instance); // 4
+ if (expression == null && value != null)
+ expression = this.GetExpression (manager, value); // 4
} else {
- ReportError (manager, "No serializer found for type '" + instance.GetType ().Name + "'");
+ ReportError (manager, "No serializer found for type '" + value.GetType ().Name + "'");
}
}
return expression;
}
- protected CodeDomSerializer GetSerializer (IDesignerSerializationManager manager, object instance)
+ protected CodeDomSerializer GetSerializer (IDesignerSerializationManager manager, object value)
{
DesignerSerializerAttribute attrInstance, attrType;
attrType = attrInstance = null;
CodeDomSerializer serializer = null;
- if (instance == null)
+ if (value == null)
serializer = this.GetSerializer (manager, null);
else {
- AttributeCollection attributes = TypeDescriptor.GetAttributes (instance);
+ AttributeCollection attributes = TypeDescriptor.GetAttributes (value);
foreach (Attribute a in attributes) {
DesignerSerializerAttribute designerAttr = a as DesignerSerializerAttribute;
if (designerAttr != null && manager.GetType (designerAttr.SerializerBaseTypeName) == typeof (CodeDomSerializer)) {
}
}
- attributes = TypeDescriptor.GetAttributes (instance.GetType ());
+ attributes = TypeDescriptor.GetAttributes (value.GetType ());
foreach (Attribute a in attributes) {
DesignerSerializerAttribute designerAttr = a as DesignerSerializerAttribute;
if (designerAttr != null && manager.GetType (designerAttr.SerializerBaseTypeName) == typeof (CodeDomSerializer)) {
if (attrType != null && attrInstance != null && attrType.SerializerTypeName != attrInstance.SerializerTypeName)
serializer = Activator.CreateInstance (manager.GetType (attrInstance.SerializerTypeName)) as CodeDomSerializer;
else
- serializer = this.GetSerializer (manager, instance.GetType ());
+ serializer = this.GetSerializer (manager, value.GetType ());
}
return serializer;
}
- protected CodeDomSerializer GetSerializer (IDesignerSerializationManager manager, Type instanceType)
+ protected CodeDomSerializer GetSerializer (IDesignerSerializationManager manager, Type valueType)
{
- return manager.GetSerializer (instanceType, typeof (CodeDomSerializer)) as CodeDomSerializer;
+ return manager.GetSerializer (valueType, typeof (CodeDomSerializer)) as CodeDomSerializer;
}
- protected CodeExpression GetExpression (IDesignerSerializationManager manager, object instance)
+ protected CodeExpression GetExpression (IDesignerSerializationManager manager, object value)
{
if (manager == null)
throw new ArgumentNullException ("manager");
- if (instance == null)
- throw new ArgumentNullException ("instance");
+ if (value == null)
+ throw new ArgumentNullException ("value");
CodeExpression expression = null;
ExpressionTable expressions = manager.Context[typeof (ExpressionTable)] as ExpressionTable;
if (expressions != null) // 1st try: ExpressionTable
- expression = expressions [instance] as CodeExpression;
+ expression = expressions [value] as CodeExpression;
if (expression == null) { // 2nd try: RootContext
RootContext context = manager.Context[typeof (RootContext)] as RootContext;
- if (context != null && context.Value == instance)
+ if (context != null && context.Value == value)
expression = context.Expression;
}
if (expression == null) { // 3rd try: IReferenceService (instance.property.property.property
- string name = manager.GetName (instance);
+ string name = manager.GetName (value);
if (name == null || name.IndexOf (".") == -1) {
IReferenceService service = manager.GetService (typeof (IReferenceService)) as IReferenceService;
if (service != null) {
- name = service.GetName (instance);
+ name = service.GetName (value);
if (name != null && name.IndexOf (".") != -1) {
string[] parts = name.Split (new char[] { ',' });
- instance = manager.GetInstance (parts[0]);
- if (instance != null) {
- expression = SerializeToExpression (manager, instance);
+ value = manager.GetInstance (parts[0]);
+ if (value != null) {
+ expression = SerializeToExpression (manager, value);
if (expression != null) {
for (int i=1; i < parts.Length; i++)
expression = new CodePropertyReferenceExpression (expression, parts[i]);
return expression;
}
- protected void SetExpression (IDesignerSerializationManager manager, object instance, CodeExpression expression)
+ protected void SetExpression (IDesignerSerializationManager manager, object value, CodeExpression expression)
{
- SetExpression (manager, instance, expression, false);
+ SetExpression (manager, value, expression, false);
}
// XXX: isPreset - what does this do when set?
//
- protected void SetExpression (IDesignerSerializationManager manager, object instance, CodeExpression expression, bool isPreset)
+ protected void SetExpression (IDesignerSerializationManager manager, object value, CodeExpression expression, bool isPreset)
{
if (manager == null)
throw new ArgumentNullException ("manager");
- if (instance == null)
- throw new ArgumentNullException ("instance");
+ if (value == null)
+ throw new ArgumentNullException ("value");
if (expression == null)
throw new ArgumentNullException ("expression");
manager.Context.Append (expressions);
}
- expressions[instance] = expression;
+ expressions[value] = expression;
}
protected bool IsSerialized (IDesignerSerializationManager manager, object value)
}
// XXX: What should honorPreset do?
- protected bool IsSerialized (IDesignerSerializationManager manager, object instance, bool honorPreset)
+ protected bool IsSerialized (IDesignerSerializationManager manager, object value, bool honorPreset)
{
- if (instance == null)
- throw new ArgumentNullException ("instance");
+ if (value == null)
+ throw new ArgumentNullException ("value");
if (manager == null)
throw new ArgumentNullException ("manager");
- if (this.GetExpression (manager, instance) != null)
+ if (this.GetExpression (manager, value) != null)
return true;
else
return false;
return manager.CreateInstance (type, parameters, name, addToContainer);
}
- protected string GetUniqueName (IDesignerSerializationManager manager, object instance)
+ protected string GetUniqueName (IDesignerSerializationManager manager, object value)
{
- if (instance == null)
- throw new ArgumentNullException ("instance");
+ if (value == null)
+ throw new ArgumentNullException ("value");
if (manager == null)
throw new ArgumentNullException ("manager");
- string name = manager.GetName (instance);
+ string name = manager.GetName (value);
if (name == null) {
INameCreationService service = manager.GetService (typeof (INameCreationService)) as INameCreationService;
- name = service.CreateName (null, instance.GetType ());
+ name = service.CreateName (null, value.GetType ());
if (name == null)
- name = instance.GetType ().Name.ToLower ();
- manager.SetName (instance, name);
+ name = value.GetType ().Name.ToLower ();
+ manager.SetName (value, name);
}
return name;
}
return instance;
}
- public object GetSerializer (Type componentType, Type serializerType)
+ public object GetSerializer (Type objectType, Type serializerType)
{
VerifyInSession ();
object serializer = null;
- if (componentType != null) {
+ if (objectType != null) {
// try 1: from cache
//
- _serializersCache.TryGetValue (componentType, out serializer);
+ _serializersCache.TryGetValue (objectType, out serializer);
// check for provider attribute and add it to the list of providers
//
if (serializer != null && !serializerType.IsAssignableFrom (serializer.GetType ()))
serializer = null;
- AttributeCollection attributes = TypeDescriptor.GetAttributes (componentType);
+ AttributeCollection attributes = TypeDescriptor.GetAttributes (objectType);
DefaultSerializationProviderAttribute providerAttribute = attributes[typeof (DefaultSerializationProviderAttribute)]
as DefaultSerializationProviderAttribute;
if (providerAttribute != null && this.GetType (providerAttribute.ProviderTypeName) == serializerType) {
// try 2: DesignerSerializerAttribute
//
- if (serializer == null && componentType != null) {
- AttributeCollection attributes = TypeDescriptor.GetAttributes (componentType);
+ if (serializer == null && objectType != null) {
+ AttributeCollection attributes = TypeDescriptor.GetAttributes (objectType);
DesignerSerializerAttribute serializerAttribute = attributes[typeof (DesignerSerializerAttribute)] as DesignerSerializerAttribute;
if (serializerAttribute != null &&
this.GetType (serializerAttribute.SerializerBaseTypeName) == serializerType) {
}
if (serializer != null)
- _serializersCache[componentType] = serializer;
+ _serializersCache[objectType] = serializer;
}
// try 3: from provider
//
if (serializer == null && _serializationProviders != null) {
foreach (IDesignerSerializationProvider provider in _serializationProviders) {
- serializer = provider.GetSerializer (this, null, componentType, serializerType);
+ serializer = provider.GetSerializer (this, null, objectType, serializerType);
if (serializer != null)
break;
}
_serializationCompleteHandler (this, EventArgs.Empty);
}
- protected virtual Type GetType (string name)
+ protected virtual Type GetType (string typeName)
{
- if (name == null)
- throw new ArgumentNullException ("name");
+ if (typeName == null)
+ throw new ArgumentNullException ("typeName");
this.VerifyInSession ();
Type result = null;
ITypeResolutionService typeResSvc = this.GetService (typeof (ITypeResolutionService)) as ITypeResolutionService;
if (typeResSvc != null)
- result = typeResSvc.GetType (name);
+ result = typeResSvc.GetType (typeName);
if (result == null)
- result = Type.GetType (name);
+ result = Type.GetType (typeName);
return result;
}
}
#endregion
- object IServiceProvider.GetService (Type service)
+ object IServiceProvider.GetService (Type serviceType)
{
- return this.GetService (service);
+ return this.GetService (serviceType);
}
- protected virtual object GetService (Type service)
+ protected virtual object GetService (Type serviceType)
{
object result = null;
if (_serviceProvider != null)
- result = _serviceProvider.GetService (service);
+ result = _serviceProvider.GetService (serviceType);
return result;
}
return _statements.GetEnumerator ();
}
- public CodeStatementCollection this[object owner]
+ public CodeStatementCollection this[object statementOwner]
{
- get { return _statements[owner] as CodeStatementCollection; }
+ get { return _statements[statementOwner] as CodeStatementCollection; }
}
IEnumerator IEnumerable.GetEnumerator()
CodeExpression _expression;
object _value;
- public RootContext (CodeExpression expresion, object value)
+ public RootContext (CodeExpression expression, object value)
{
- if (expresion == null)
+ if (expression == null)
throw new ArgumentNullException ("expression");
if (value == null)
throw new ArgumentNullException ("value");
- _expression = expresion;
+ _expression = expression;
_value = value;
}
// Helper method - not an ISerivceProvider
//
- protected virtual object GetService (Type service)
+ protected virtual object GetService (Type serviceType)
{
if (_component != null && _component.Site != null)
- return _component.Site.GetService (service);
+ return _component.Site.GetService (serviceType);
return null;
}
{
}
- public DesignSurfaceManager (IServiceProvider serviceProvider)
+ public DesignSurfaceManager (IServiceProvider parentProvider)
{
- _parentProvider = serviceProvider;
+ _parentProvider = parentProvider;
this.ServiceContainer.AddService (typeof (IDesignerEventService), new DesignerEventService ());
}
}
- public object GetService (Type service)
+ public object GetService (Type serviceType)
{
if (_serviceContainer != null)
- return _serviceContainer.GetService (service);
+ return _serviceContainer.GetService (serviceType);
return null;
}
protected abstract bool ShowCode (IComponent component, EventDescriptor e, string methodName);
protected abstract bool ShowCode (int lineNumber);
protected abstract bool ShowCode ();
- protected abstract string CreateUniqueMethodName (IComponent component, EventDescriptor eventDescriptor);
- protected abstract ICollection GetCompatibleMethods (EventDescriptor eventDescriptor);
+ protected abstract string CreateUniqueMethodName (IComponent component, EventDescriptor e);
+ protected abstract ICollection GetCompatibleMethods (EventDescriptor e);
protected virtual void FreeMethod (IComponent component, EventDescriptor e, string methodName)
{
}
- protected object GetService (Type service)
+ protected object GetService (Type serviceType)
{
if (_provider != null)
- return _provider.GetService (service);
+ return _provider.GetService (serviceType);
return null;
}
return false;
}
- public virtual bool GlobalInvoke (CommandID commandID, object arg)
+ public virtual bool GlobalInvoke (CommandID commandId, object arg)
{
- if (commandID == null)
- throw new ArgumentNullException ("commandID");
+ if (commandId == null)
+ throw new ArgumentNullException ("commandId");
- MenuCommand command = this.FindCommand (commandID);
+ MenuCommand command = this.FindCommand (commandId);
if (command != null) {
command.Invoke (arg);
return true;
errorList.Add (info.GetString("KEY_ARRAYVALUES" + i));
}
- public TypedDataSetGeneratorException (String error) : base (error)
+ public TypedDataSetGeneratorException (String message) : base (message)
{
}
- public TypedDataSetGeneratorException (String error, Exception inner)
- : base (error, inner)
+ public TypedDataSetGeneratorException (String message, Exception innerException)
+ : base (message, innerException)
{
}
#endregion //Constructors
#region Methods
- public override void GetObjectData (SerializationInfo si, StreamingContext context)
+ public override void GetObjectData (SerializationInfo info, StreamingContext context)
{
- base.GetObjectData (si, context);
+ base.GetObjectData (info, context);
int count = (errorList != null) ? ErrorList.Count : 0;
- si.AddValue ("KEY_ARRAYCOUNT", count);
+ info.AddValue ("KEY_ARRAYCOUNT", count);
for (int i=0; i < count; i++)
- si.AddValue("KEY_ARRAYVALUES" + i, ErrorList [i]);
+ info.AddValue("KEY_ARRAYVALUES" + i, ErrorList [i]);
}
#endregion // Methods
{
int initial_page;
- public BaseDataListComponentEditor (int initial_page)
+ public BaseDataListComponentEditor (int initialPage)
{
- this.initial_page = initial_page;
+ this.initial_page = initialPage;
}
public override bool EditComponent (
}
protected IEnumerable GetDesignTimeDataSource (
- int minimum_rows,
- out bool dummy_data_source)
+ int minimumRows,
+ out bool dummyDataSource)
{
throw new NotImplementedException ();
}
protected IEnumerable GetDesignTimeDataSource (
- IEnumerable selected_data_source,
- int minimum_rows,
- out bool dummy_data_source)
+ IEnumerable selectedDataSource,
+ int minimumRows,
+ out bool dummyDataSource)
{
throw new NotImplementedException ();
}
throw new NotImplementedException ();
}
- public override IEnumerable GetTemplateContainerDataSource (string template_name)
+ public override IEnumerable GetTemplateContainerDataSource (string templateName)
{
throw new NotImplementedException ();
}
throw new NotImplementedException ();
}
- protected internal void InvokePropertyBuilder (int initial_page)
+ protected internal void InvokePropertyBuilder (int initialPage)
{
throw new NotImplementedException ();
}
{
}
- public DataListComponentEditor (int initial_page)
- : base (initial_page)
+ public DataListComponentEditor (int initialPage)
+ : base (initialPage)
{
}
throw new NotImplementedException ();
}
- public override void DataBindControl (IDesignerHost designer_host, Control control)
+ public override void DataBindControl (IDesignerHost designerHost, Control control)
{
throw new NotImplementedException ();
}
{
}
- protected override void MapPropertyToStyle (string name, object value)
+ protected override void MapPropertyToStyle (string propName, object varPropValue)
{
throw new NotImplementedException ();
}
throw new NotImplementedException ();
}
- protected IEnumerable GetDesignTimeDataSource (int minimum_rows)
+ protected IEnumerable GetDesignTimeDataSource (int minimumRows)
{
throw new NotImplementedException ();
}
protected IEnumerable GetDesignTimeDataSource (
- IEnumerable selected_data_source,
- int minimum_rows)
+ IEnumerable selectedDataSource,
+ int minimumRows)
{
throw new NotImplementedException ();
}
throw new NotImplementedException ();
}
- public override void OnComponentChanged (object sender, ComponentChangedEventArgs e)
+ public override void OnComponentChanged (object source, ComponentChangedEventArgs ce)
{
throw new NotImplementedException ();
}
throw new NotImplementedException ();
}
- protected override object CreateInstance (Type item_type)
+ protected override object CreateInstance (Type itemType)
{
throw new NotImplementedException ();
}
throw new NotImplementedException ();
}
- protected override object CreateInstance (Type item_type)
+ protected override object CreateInstance (Type itemType)
{
throw new NotImplementedException ();
}
return false;
}
- protected override object GetService (Type service)
+ protected override object GetService (Type serviceType)
{
if (_serviceProvider != null) {
- return _serviceProvider.GetService (service);
+ return _serviceProvider.GetService (serviceType);
}
return null;
}
#region Parenting
- protected void HookChildControls (Control firstControl)
+ protected void HookChildControls (Control firstChild)
{
- if (firstControl != null) {
- foreach (Control control in firstControl.Controls) {
+ if (firstChild != null) {
+ foreach (Control control in firstChild.Controls) {
control.WindowTarget = (IWindowTarget) new WndProcRouter (control, (IMessageReceiver) this);
}
}
}
- protected void UnhookChildControls (Control firstControl)
+ protected void UnhookChildControls (Control firstChild)
{
- if (firstControl != null) {
- foreach (Control control in firstControl.Controls) {
+ if (firstChild != null) {
+ foreach (Control control in firstChild.Controls) {
if (control.WindowTarget is WndProcRouter)
((WndProcRouter) control.WindowTarget).Dispose ();
}
e.UseDefaultCursors = false;
}
- protected virtual void OnDragDrop (DragEventArgs e)
+ protected virtual void OnDragDrop (DragEventArgs de)
{
}
- protected virtual void OnDragEnter (DragEventArgs e)
+ protected virtual void OnDragEnter (DragEventArgs de)
{
}
{
}
- protected virtual void OnDragOver (DragEventArgs e)
+ protected virtual void OnDragOver (DragEventArgs de)
{
}
#endregion
// component - The IComponent to ensure has a context menu service.
// XXX: Not sure exactly what this should do...
//
- protected virtual void EnsureMenuEditorService (IComponent component)
+ protected virtual void EnsureMenuEditorService (IComponent c)
{
- if (this.menuEditorService == null && component is ContextMenu)
+ if (this.menuEditorService == null && c is ContextMenu)
menuEditorService = (IMenuEditorService) GetService (typeof (IMenuEditorService));
}
#endregion
return false;
}
- public virtual bool CanParent (ControlDesigner designer)
+ public virtual bool CanParent (ControlDesigner controlDesigner)
{
- return CanParent (designer.Control);
+ return CanParent (controlDesigner.Control);
}
- protected override void OnDragDrop (DragEventArgs e)
+ protected override void OnDragDrop (DragEventArgs de)
{
IUISelectionService selectionServ = this.GetService (typeof (IUISelectionService)) as IUISelectionService;
if (selectionServ != null) {
// once this is fired the parent control (parentcontroldesigner) will start getting dragover events.
//
- Point location = this.SnapPointToGrid (this.Control.PointToClient (new Point (e.X, e.Y)));
+ Point location = this.SnapPointToGrid (this.Control.PointToClient (new Point (de.X, de.Y)));
selectionServ.DragDrop (false, this.Control, location.X, location.Y);
}
}
- protected override void OnDragEnter (DragEventArgs e)
+ protected override void OnDragEnter (DragEventArgs de)
{
this.Control.Refresh ();
}
this.Control.Refresh ();
}
- protected override void OnDragOver (DragEventArgs e)
+ protected override void OnDragOver (DragEventArgs de)
{
IUISelectionService selectionServ = this.GetService (typeof (IUISelectionService)) as IUISelectionService;
if (selectionServ != null) {
// once ControlDesigner.MouseDragBegin is called this will start getting dragover events.
//
- Point location = this.SnapPointToGrid (this.Control.PointToClient (new Point (e.X, e.Y)));
+ Point location = this.SnapPointToGrid (this.Control.PointToClient (new Point (de.X, de.Y)));
selectionServ.DragOver (this.Control, location.X, location.Y);
}
- e.Effect = DragDropEffects.Move;
+ de.Effect = DragDropEffects.Move;
}
#endregion
private const int HTHSCROLL = 6;
private const int HTVSCROLL = 7;
- protected override bool GetHitTest (Point point)
+ protected override bool GetHitTest (Point pt)
{
- if (base.GetHitTest (point)) {
+ if (base.GetHitTest (pt)) {
return true;
}
int hitTestResult = (int) Native.SendMessage (this.Control.Handle,
Native.Msg.WM_NCHITTEST,
IntPtr.Zero,
- (IntPtr) Native.LParam (point.X, point.Y));
+ (IntPtr) Native.LParam (pt.X, pt.Y));
if (hitTestResult == HTHSCROLL || hitTestResult == HTVSCROLL)
return true;
}
Assembly/AssemblyInfo.cs
-../../build/common/Consts.cs.in
+../../build/common/Consts.cs
../../build/common/Locale.cs
System.DirectoryServices/ActiveDirectoryAccessRule.cs
System.DirectoryServices/ActiveDirectoryAuditRule.cs
/// <param name="filter">relative distinguised name of the child
/// </param>
/// <returns>Child entry with the specified name </returns>
- public DirectoryEntry Find(string filter)
+ public DirectoryEntry Find(string name)
{
- DirectoryEntry child=CheckEntry(filter);
+ DirectoryEntry child=CheckEntry(name);
return child;
}
/// <param name="otype"> Type of the child i.e strutcuralObjectClass
/// name of the child </param>
/// <returns>Child entry with the specified name and type</returns>
- public DirectoryEntry Find(string filter, string otype)
+ public DirectoryEntry Find(string name, string schemaClassName)
{
- DirectoryEntry child=CheckEntry(filter);
+ DirectoryEntry child=CheckEntry(name);
if( child != null) {
- if(child.Properties["objectclass"].ContainsCaselessStringValue(otype))
+ if(child.Properties["objectclass"].ContainsCaselessStringValue(schemaClassName))
return child;
else
throw new SystemException("An unknown directory object was requested");
SetUp ();
}
- public DirectoryServicesPermission (DirectoryServicesPermissionEntry[] entries)
+ public DirectoryServicesPermission (DirectoryServicesPermissionEntry[] permissionAccessEntries)
{
SetUp ();
innerCollection = new DirectoryServicesPermissionEntryCollection (this);
- innerCollection.AddRange (entries);
+ innerCollection.AddRange (permissionAccessEntries);
}
public DirectoryServicesPermission (PermissionState state)
SetUp ();
}
- public DirectoryServicesPermission (DirectoryServicesPermissionAccess access, string path)
+ public DirectoryServicesPermission (DirectoryServicesPermissionAccess permissionAccess, string path)
{
SetUp ();
innerCollection = new DirectoryServicesPermissionEntryCollection (this);
- innerCollection.Add (new DirectoryServicesPermissionEntry (access, path));
+ innerCollection.Add (new DirectoryServicesPermissionEntry (permissionAccess, path));
}
public DirectoryServicesPermissionEntryCollection PermissionEntries {
set { List[index] = value; }
}
- public int Add (DirectoryServicesPermissionEntry entry)
+ public int Add (DirectoryServicesPermissionEntry value)
{
- return List.Add (entry);
+ return List.Add (value);
}
- public void AddRange (DirectoryServicesPermissionEntry[] entries)
+ public void AddRange (DirectoryServicesPermissionEntry[] value)
{
- foreach (DirectoryServicesPermissionEntry entry in entries)
+ foreach (DirectoryServicesPermissionEntry entry in value)
Add (entry);
}
- public void AddRange (DirectoryServicesPermissionEntryCollection entries)
+ public void AddRange (DirectoryServicesPermissionEntryCollection value)
{
- foreach (DirectoryServicesPermissionEntry entry in entries)
+ foreach (DirectoryServicesPermissionEntry entry in value)
Add (entry);
}
- public void CopyTo (DirectoryServicesPermissionEntry[] copy_to, int index)
+ public void CopyTo (DirectoryServicesPermissionEntry[] array, int index)
{
foreach (DirectoryServicesPermissionEntry entry in List)
- copy_to[index++] = entry;
+ array[index++] = entry;
}
- public bool Contains (DirectoryServicesPermissionEntry entry)
+ public bool Contains (DirectoryServicesPermissionEntry value)
{
- return List.Contains (entry);
+ return List.Contains (value);
}
- public int IndexOf (DirectoryServicesPermissionEntry entry)
+ public int IndexOf (DirectoryServicesPermissionEntry value)
{
- return List.IndexOf (entry);
+ return List.IndexOf (value);
}
- public void Insert (int pos, DirectoryServicesPermissionEntry entry)
+ public void Insert (int index, DirectoryServicesPermissionEntry value)
{
- List.Insert (pos, entry);
+ List.Insert (index, value);
}
- public void Remove (DirectoryServicesPermissionEntry entry)
+ public void Remove (DirectoryServicesPermissionEntry value)
{
- List.Remove (entry);
+ List.Remove (value);
}
protected override void OnClear ()
}
- public void AddRange(object[] values)
+ public void AddRange(object[] value)
{
- foreach (object value in values)
- Add (value);
+ foreach (object val in value)
+ Add (val);
}
- public void AddRange (PropertyValueCollection coll)
+ public void AddRange (PropertyValueCollection value)
{
- foreach (object value in coll)
- Add (value);
+ foreach (object val in value)
+ Add (val);
}
public int IndexOf( object value )
return false;
}
- public void CopyTo (object[] copy_to, int index)
+ public void CopyTo (object[] array, int index)
{
foreach (object o in List)
- copy_to[index++] = o;
+ array[index++] = o;
}
[MonoTODO]
}
- public ResultPropertyValueCollection this[string key]
+ public ResultPropertyValueCollection this[string name]
{
get {
- return (ResultPropertyValueCollection) this.Dictionary[key.ToLower()];
+ return (ResultPropertyValueCollection) this.Dictionary[name.ToLower()];
}
// set { this.Dictionary[key] = value; }
}
}
//see if collection contains an entry corresponding to key
- public bool Contains(string key)
+ public bool Contains(string propertyName)
{
- return this.Dictionary.Contains(key.ToLower());
+ return this.Dictionary.Contains(propertyName.ToLower());
}
public ICollection PropertyNames
}
}
- public void CopyTo (ResultPropertyValueCollection[] copy_to, int index)
+ public void CopyTo (ResultPropertyValueCollection[] array, int index)
{
foreach (ResultPropertyValueCollection vals in Values)
- copy_to[index++] = vals;
+ array[index++] = vals;
}
}
}
return InnerList.Contains (value);
}
- public void CopyTo (object[] array, int index)
+ public void CopyTo (object[] values, int index)
{
- InnerList.CopyTo (array, index);
+ InnerList.CopyTo (values, index);
}
public int IndexOf (object value)
}
[MonoTODO]
- public void AddRange (SchemaNameCollection coll)
+ public void AddRange (SchemaNameCollection value)
{
throw new NotImplementedException();
}
[MonoTODO]
- public void AddRange (string[] coll)
+ public void AddRange (string[] value)
{
throw new NotImplementedException();
}
[MonoTODO]
- public bool Contains (string s)
+ public bool Contains (string value)
{
throw new NotImplementedException();
}
}
[MonoTODO]
- public void CopyTo (string[] copy_to, int pos)
+ public void CopyTo (string[] stringArray, int index)
{
throw new NotImplementedException();
}
[MonoTODO]
- public int IndexOf (string s)
+ public int IndexOf (string value)
{
throw new NotImplementedException();
}
[MonoTODO]
- public void Insert (int pos, string s)
+ public void Insert (int index, string value)
{
throw new NotImplementedException();
}
[MonoTODO]
- public void Remove (string s)
+ public void Remove (string value)
{
throw new NotImplementedException();
}
//
// AddArc
//
- public void AddArc (Rectangle rect, float start_angle, float sweep_angle)
+ public void AddArc (Rectangle rect, float startAngle, float sweepAngle)
{
- Status status = GDIPlus.GdipAddPathArcI (nativePath, rect.X, rect.Y, rect.Width, rect.Height, start_angle, sweep_angle);
+ Status status = GDIPlus.GdipAddPathArcI (nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
GDIPlus.CheckStatus (status);
}
- public void AddArc (RectangleF rect, float start_angle, float sweep_angle)
+ public void AddArc (RectangleF rect, float startAngle, float sweepAngle)
{
- Status status = GDIPlus.GdipAddPathArc (nativePath, rect.X, rect.Y, rect.Width, rect.Height, start_angle, sweep_angle);
+ Status status = GDIPlus.GdipAddPathArc (nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
GDIPlus.CheckStatus (status);
}
- public void AddArc (int x, int y, int width, int height, float start_angle, float sweep_angle)
+ public void AddArc (int x, int y, int width, int height, float startAngle, float sweepAngle)
{
- Status status = GDIPlus.GdipAddPathArcI (nativePath, x, y, width, height, start_angle, sweep_angle);
+ Status status = GDIPlus.GdipAddPathArcI (nativePath, x, y, width, height, startAngle, sweepAngle);
GDIPlus.CheckStatus (status);
}
- public void AddArc (float x, float y, float width, float height, float start_angle, float sweep_angle)
+ public void AddArc (float x, float y, float width, float height, float startAngle, float sweepAngle)
{
- Status status = GDIPlus.GdipAddPathArc (nativePath, x, y, width, height, start_angle, sweep_angle);
+ Status status = GDIPlus.GdipAddPathArc (nativePath, x, y, width, height, startAngle, sweepAngle);
GDIPlus.CheckStatus (status);
}
//
// AddBeziers
//
- public void AddBeziers (params Point [] pts)
+ public void AddBeziers (params Point [] points)
{
- if (pts == null)
- throw new ArgumentNullException ("pts");
- Status status = GDIPlus.GdipAddPathBeziersI (nativePath, pts, pts.Length);
+ if (points == null)
+ throw new ArgumentNullException ("points");
+ Status status = GDIPlus.GdipAddPathBeziersI (nativePath, points, points.Length);
GDIPlus.CheckStatus (status);
}
- public void AddBeziers (PointF [] pts)
+ public void AddBeziers (PointF [] points)
{
- if (pts == null)
- throw new ArgumentNullException ("pts");
- Status status = GDIPlus.GdipAddPathBeziers (nativePath, pts, pts.Length);
+ if (points == null)
+ throw new ArgumentNullException ("points");
+ Status status = GDIPlus.GdipAddPathBeziers (nativePath, points, points.Length);
GDIPlus.CheckStatus (status);
}
//
// AddEllipse
//
- public void AddEllipse (RectangleF r)
+ public void AddEllipse (RectangleF rect)
{
- Status status = GDIPlus.GdipAddPathEllipse (nativePath, r.X, r.Y, r.Width, r.Height);
+ Status status = GDIPlus.GdipAddPathEllipse (nativePath, rect.X, rect.Y, rect.Width, rect.Height);
GDIPlus.CheckStatus (status);
}
GDIPlus.CheckStatus (status);
}
- public void AddEllipse (Rectangle r)
+ public void AddEllipse (Rectangle rect)
{
- Status status = GDIPlus.GdipAddPathEllipseI (nativePath, r.X, r.Y, r.Width, r.Height);
+ Status status = GDIPlus.GdipAddPathEllipseI (nativePath, rect.X, rect.Y, rect.Width, rect.Height);
GDIPlus.CheckStatus (status);
}
//
// AddLine
//
- public void AddLine (Point a, Point b)
+ public void AddLine (Point pt1, Point pt2)
{
- Status status = GDIPlus.GdipAddPathLineI (nativePath, a.X, a.Y, b.X, b.Y);
+ Status status = GDIPlus.GdipAddPathLineI (nativePath, pt1.X, pt1.Y, pt2.X, pt2.Y);
GDIPlus.CheckStatus (status);
}
- public void AddLine (PointF a, PointF b)
+ public void AddLine (PointF pt1, PointF pt2)
{
- Status status = GDIPlus.GdipAddPathLine (nativePath, a.X, a.Y, b.X,
- b.Y);
+ Status status = GDIPlus.GdipAddPathLine (nativePath, pt1.X, pt1.Y, pt2.X,
+ pt2.Y);
GDIPlus.CheckStatus (status);
}
{
}
- public HatchBrush (HatchStyle hatchStyle, Color foreColor)
- : this (hatchStyle, foreColor, Color.Black)
+ public HatchBrush (HatchStyle hatchstyle, Color foreColor)
+ : this (hatchstyle, foreColor, Color.Black)
{
}
- public HatchBrush(HatchStyle hatchStyle, Color foreColor, Color backColor)
+ public HatchBrush(HatchStyle hatchstyle, Color foreColor, Color backColor)
{
- Status status = GDIPlus.GdipCreateHatchBrush (hatchStyle, foreColor.ToArgb (), backColor.ToArgb (), out nativeObject);
+ Status status = GDIPlus.GdipCreateHatchBrush (hatchstyle, foreColor.ToArgb (), backColor.ToArgb (), out nativeObject);
GDIPlus.CheckStatus (status);
}
}
[CLSCompliant(false)]
- public ColorMatrix (float[][] matrix)
+ public ColorMatrix (float[][] newColorMatrix)
{
- color00 = matrix [0][0];
- color01 = matrix [0][1];
- color02 = matrix [0][2];
- color03 = matrix [0][3];
- color04 = matrix [0][4];
- color10 = matrix [1][0];
- color11 = matrix [1][1];
- color12 = matrix [1][2];
- color13 = matrix [1][3];
- color14 = matrix [1][4];
- color20 = matrix [2][0];
- color21 = matrix [2][1];
- color22 = matrix [2][2];
- color23 = matrix [2][3];
- color24 = matrix [2][4];
- color30 = matrix [3][0];
- color31 = matrix [3][1];
- color32 = matrix [3][2];
- color33 = matrix [3][3];
- color34 = matrix [3][4];
- color40 = matrix [4][0];
- color41 = matrix [4][1];
- color42 = matrix [4][2];
- color43 = matrix [4][3];
- color44 = matrix [4][4];
+ color00 = newColorMatrix [0][0];
+ color01 = newColorMatrix [0][1];
+ color02 = newColorMatrix [0][2];
+ color03 = newColorMatrix [0][3];
+ color04 = newColorMatrix [0][4];
+ color10 = newColorMatrix [1][0];
+ color11 = newColorMatrix [1][1];
+ color12 = newColorMatrix [1][2];
+ color13 = newColorMatrix [1][3];
+ color14 = newColorMatrix [1][4];
+ color20 = newColorMatrix [2][0];
+ color21 = newColorMatrix [2][1];
+ color22 = newColorMatrix [2][2];
+ color23 = newColorMatrix [2][3];
+ color24 = newColorMatrix [2][4];
+ color30 = newColorMatrix [3][0];
+ color31 = newColorMatrix [3][1];
+ color32 = newColorMatrix [3][2];
+ color33 = newColorMatrix [3][3];
+ color34 = newColorMatrix [3][4];
+ color40 = newColorMatrix [4][0];
+ color41 = newColorMatrix [4][1];
+ color42 = newColorMatrix [4][2];
+ color43 = newColorMatrix [4][3];
+ color44 = newColorMatrix [4][4];
}
// properties
}
}
- public EncoderParameter (Encoder encoder, int numberOfValues, int type, int value)
+ public EncoderParameter (Encoder encoder, int NumberOfValues, int Type, int Value)
{
this.encoder = encoder;
- this.valuePtr = (IntPtr) value;
- this.valuesCount = numberOfValues;
- this.type = (EncoderParameterValueType) type;
+ this.valuePtr = (IntPtr) Value;
+ this.valuesCount = NumberOfValues;
+ this.type = (EncoderParameterValueType) Type;
}
- public EncoderParameter (Encoder encoder, int numerator1, int denominator1, int numerator2, int denominator2)
+ public EncoderParameter (Encoder encoder, int numerator1, int demoninator1, int numerator2, int demoninator2)
{
this.encoder = encoder;
this.valuesCount = 1;
this.type = EncoderParameterValueType.ValueTypeRationalRange;
this.valuePtr = Marshal.AllocHGlobal (4 * 4);
- int [] valuearray = { numerator1, denominator1, numerator2, denominator2 };
+ int [] valuearray = { numerator1, demoninator1, numerator2, demoninator2 };
Marshal.Copy (valuearray, 0, this.valuePtr, 4);
}
SetColorKey (colorLow, colorHigh, ColorAdjustType.Default);
}
- public void SetColorMatrix (ColorMatrix colorMatrix)
+ public void SetColorMatrix (ColorMatrix newColorMatrix)
{
- SetColorMatrix (colorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default);
+ SetColorMatrix (newColorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default);
}
- public void SetColorMatrix (ColorMatrix colorMatrix, ColorMatrixFlag colorMatrixFlag)
+ public void SetColorMatrix (ColorMatrix newColorMatrix, ColorMatrixFlag flags)
{
- SetColorMatrix (colorMatrix, colorMatrixFlag, ColorAdjustType.Default);
+ SetColorMatrix (newColorMatrix, flags, ColorAdjustType.Default);
}
- public void SetColorMatrix (ColorMatrix colorMatrix, ColorMatrixFlag colorMatrixFlag, ColorAdjustType colorAdjustType)
+ public void SetColorMatrix (ColorMatrix newColorMatrix, ColorMatrixFlag mode, ColorAdjustType type)
{
- IntPtr cm = ColorMatrix.Alloc (colorMatrix);
+ IntPtr cm = ColorMatrix.Alloc (newColorMatrix);
try {
Status status = GDIPlus.GdipSetImageAttributesColorMatrix (nativeImageAttr,
- colorAdjustType, true, cm, IntPtr.Zero, colorMatrixFlag);
+ type, true, cm, IntPtr.Zero, mode);
GDIPlus.CheckStatus (status);
}
finally {
SetGamma (gamma, ColorAdjustType.Default);
}
- public void SetGamma (float gamma, ColorAdjustType coloradjust)
+ public void SetGamma (float gamma, ColorAdjustType type)
{
- Status status = GDIPlus.GdipSetImageAttributesGamma (nativeImageAttr, coloradjust, true, gamma);
+ Status status = GDIPlus.GdipSetImageAttributesGamma (nativeImageAttr, type, true, gamma);
GDIPlus.CheckStatus (status);
}
}
public Metafile (IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type,
- string description)
+ string desc)
{
Status status = GDIPlus.GdipRecordMetafileI (referenceHdc, type, ref frameRect, frameUnit,
- description, out nativeObject);
+ desc, out nativeObject);
GDIPlus.CheckStatus (status);
}
}
public Metafile (string fileName, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit,
- string description) : this (fileName, referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual,
- description)
+ string desc) : this (fileName, referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual,
+ desc)
{
}
}
[MonoLimitation ("Metafiles aren't only partially supported by libgdiplus.")]
- public static MetafileHeader GetMetafileHeader (IntPtr henhmetafile, WmfPlaceableFileHeader wmfHeader)
+ public static MetafileHeader GetMetafileHeader (IntPtr hmetafile, WmfPlaceableFileHeader wmfHeader)
{
IntPtr header = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (MetafileHeader)));
try {
- Status status = GDIPlus.GdipGetMetafileHeaderFromEmf (henhmetafile, header);
+ Status status = GDIPlus.GdipGetMetafileHeaderFromEmf (hmetafile, header);
GDIPlus.CheckStatus (status);
return new MetafileHeader (header);
}
IntPtr data,
PlayRecordCallback callbackData);
- public delegate bool DrawImageAbort (IntPtr callbackData);
+ public delegate bool DrawImageAbort (IntPtr callbackdata);
internal Graphics (IntPtr nativeGraphics)
{
// Sanjay Gupta (gsanjay@novell.com)
// Ravindra (rkumar@novell.com)
// Peter Dennis Bartok (pbartok@novell.com)
-// Sebastien Pouliot <sebastien@ximian.com>
+// Sebastien Pouliot <sebastien@ximian.com>
//
// Copyright (C) 2004 - 2007 Novell, Inc (http://www.novell.com)
//
// Copies an array of Points to unmanaged memory
static public IntPtr FromPointToUnManagedMemoryI (Point [] pts)
{
- int nPointSize = Marshal.SizeOf (pts[0]);
+ int nPointSize = Marshal.SizeOf (pts[0]);
IntPtr dest = Marshal.AllocHGlobal (nPointSize * pts.Length);
IntPtr pos = dest;
for (int i=0; i<pts.Length; i++, pos = new IntPtr (pos.ToInt64 () + nPointSize))
// Copies an array of Points to unmanaged memory
static public IntPtr FromPointToUnManagedMemory (PointF [] pts)
{
- int nPointSize = Marshal.SizeOf (pts[0]);
+ int nPointSize = Marshal.SizeOf (pts[0]);
IntPtr dest = Marshal.AllocHGlobal (nPointSize * pts.Length);
IntPtr pos = dest;
for (int i=0; i<pts.Length; i++, pos = new IntPtr (pos.ToInt64 () + nPointSize))
static internal extern Status GdipCreateRegionRect (ref RectangleF rect, out IntPtr region);
[DllImport(GdiPlus)]
- static internal extern Status GdipCreateRegionRectI (ref Rectangle rect, out IntPtr region);
+ static internal extern Status GdipCreateRegionRectI (ref Rectangle rect, out IntPtr region);
[DllImport(GdiPlus)]
static internal extern Status GdipCreateRegionPath (IntPtr path, out IntPtr region);
float height, IntPtr graphics, out bool result);
[DllImport(GdiPlus)]
- static internal extern Status GdipIsVisibleRegionRectI (IntPtr region, int x, int y, int width,
+ static internal extern Status GdipIsVisibleRegionRectI (IntPtr region, int x, int y, int width,
int height, IntPtr graphics, out bool result);
[DllImport(GdiPlus)]
static internal extern Status GdipGetRegionData (IntPtr region, byte[] buffer, int bufferSize,
- out int sizeFilled);
+ out int sizeFilled);
[DllImport(GdiPlus)]
static internal extern Status GdipGetRegionScansCount (IntPtr region, out int count, IntPtr matrix);
[DllImport(GdiPlus)]
- static internal extern Status GdipGetRegionScans (IntPtr region, IntPtr rects, out int count,
+ static internal extern Status GdipGetRegionScans (IntPtr region, IntPtr rects, out int count,
IntPtr matrix);
[DllImport(GdiPlus)]
[DllImport(GdiPlus)]
static internal extern Status GdipGetTextureImage (IntPtr texture, out IntPtr image);
[DllImport(GdiPlus)]
- static internal extern Status GdipCreateTexture (IntPtr image, WrapMode wrapMode, out IntPtr texture);
+ static internal extern Status GdipCreateTexture (IntPtr image, WrapMode wrapMode, out IntPtr texture);
[DllImport(GdiPlus)]
static internal extern Status GdipCreateTextureIAI (IntPtr image, IntPtr imageAttributes, int x, int y, int width, int height, out IntPtr texture);
[DllImport(GdiPlus)]
[DllImport(GdiPlus)]
static internal extern Status GdipFillEllipse (IntPtr graphics, IntPtr pen, float x, float y, float width, float height);
[DllImport (GdiPlus)]
- static internal extern Status GdipFillPolygon (IntPtr graphics, IntPtr brush, PointF [] points, int count, FillMode fillMode);
+ static internal extern Status GdipFillPolygon (IntPtr graphics, IntPtr brush, PointF [] points, int count, FillMode fillMode);
[DllImport (GdiPlus)]
- static internal extern Status GdipFillPolygonI (IntPtr graphics, IntPtr brush, Point [] points, int count, FillMode fillMode);
+ static internal extern Status GdipFillPolygonI (IntPtr graphics, IntPtr brush, Point [] points, int count, FillMode fillMode);
[DllImport (GdiPlus)]
- static internal extern Status GdipFillPolygon2 (IntPtr graphics, IntPtr brush, PointF [] points, int count);
+ static internal extern Status GdipFillPolygon2 (IntPtr graphics, IntPtr brush, PointF [] points, int count);
[DllImport (GdiPlus)]
- static internal extern Status GdipFillPolygon2I (IntPtr graphics, IntPtr brush, Point [] points, int count);
+ static internal extern Status GdipFillPolygon2I (IntPtr graphics, IntPtr brush, Point [] points, int count);
[DllImport(GdiPlus)]
static internal extern Status GdipFillRectangle (IntPtr graphics, IntPtr brush, float x1, float y1, float x2, float y2);
[DllImport(GdiPlus)]
[DllImport(GdiPlus)]
internal static extern Status GdipFillClosedCurve2(IntPtr graphics, IntPtr brush,
- PointF [] points, int count, float tension, FillMode fillMode);
+ PointF [] points, int count, float tension, FillMode fillMode);
[DllImport(GdiPlus)]
internal static extern Status GdipFillClosedCurve2I(IntPtr graphics, IntPtr brush,
internal static extern Status GdipFillPath(IntPtr graphics, IntPtr brush, IntPtr path);
[DllImport(GdiPlus)]
- internal static extern Status GdipGetNearestColor(IntPtr graphics, out int argb);
+ internal static extern Status GdipGetNearestColor(IntPtr graphics, out int argb);
[DllImport(GdiPlus)]
internal static extern Status GdipIsVisiblePoint(IntPtr graphics, float x, float y, out bool result);
[DllImport(GdiPlus)]
internal static extern Status GdipTransformPoints(IntPtr graphics, CoordinateSpace destSpace,
- CoordinateSpace srcSpace, IntPtr points, int count);
+ CoordinateSpace srcSpace, IntPtr points, int count);
[DllImport(GdiPlus)]
internal static extern Status GdipTransformPointsI(IntPtr graphics, CoordinateSpace destSpace,
internal static extern Status GdipSetStringFormatMeasurableCharacterRanges (IntPtr native,
int cnt, CharacterRange [] range);
- [DllImport(GdiPlus)]
+ [DllImport(GdiPlus)]
internal static extern Status GdipGetStringFormatMeasurableCharacterRangeCount (IntPtr native,
out int cnt);
internal static extern Status GdipImageRotateFlip ( IntPtr image, RotateFlipType rotateFlipType );
[DllImport(GdiPlus, CharSet=CharSet.Unicode)]
- internal static extern Status GdipSaveImageToFile (IntPtr image, string filename, ref Guid encoderClsID, IntPtr encoderParameters);
+ internal static extern Status GdipSaveImageToFile (IntPtr image, string filename, ref Guid encoderClsID, IntPtr encoderParameters);
[DllImport(GdiPlus)]
internal static extern Status GdipSaveAdd ( IntPtr image, IntPtr encoderParameters );
[DllImport(GdiPlus)]
- internal static extern Status GdipDrawImagePointsI (IntPtr graphics, IntPtr image, Point [] destPoints, int count);
+ internal static extern Status GdipDrawImagePointsI (IntPtr graphics, IntPtr image, Point [] destPoints, int count);
[DllImport(GdiPlus)]
internal static extern Status GdipDrawImageRectRectI (IntPtr graphics, IntPtr image,
int srcheight, GraphicsUnit srcUnit);
[DllImport(GdiPlus)]
- internal static extern Status GdipCreateStringFormat(StringFormatFlags formatAttributes, int language, out IntPtr native);
+ internal static extern Status GdipCreateStringFormat(StringFormatFlags formatAttributes, int language, out IntPtr native);
[DllImport(GdiPlus)]
internal static extern Status GdipCreateHBITMAPFromBitmap (IntPtr bmp, out IntPtr HandleBmp, int clrbackground);
internal static extern Status GdipCreateHICONFromBitmap (IntPtr bmp, out IntPtr HandleIcon);
[DllImport(GdiPlus)]
- internal static extern Status GdipCreateBitmapFromHICON (IntPtr hicon, out IntPtr bitmap);
+ internal static extern Status GdipCreateBitmapFromHICON (IntPtr hicon, out IntPtr bitmap);
[DllImport(GdiPlus)]
internal static extern Status GdipCreateBitmapFromResource (IntPtr hInstance,
[DllImport (GdiPlus)]
internal static extern Status GdipInvertMatrix (IntPtr matrix);
[DllImport (GdiPlus)]
- internal static extern Status GdipTransformMatrixPoints (IntPtr matrix, PointF [] pts, int count);
+ internal static extern Status GdipTransformMatrixPoints (IntPtr matrix, [In, Out] PointF [] pts, int count);
[DllImport (GdiPlus)]
- internal static extern Status GdipTransformMatrixPointsI (IntPtr matrix, Point [] pts, int count);
+ internal static extern Status GdipTransformMatrixPointsI (IntPtr matrix, [In, Out] Point [] pts, int count);
[DllImport (GdiPlus)]
- internal static extern Status GdipVectorTransformMatrixPoints (IntPtr matrix, PointF [] pts, int count);
+ internal static extern Status GdipVectorTransformMatrixPoints (IntPtr matrix, [In, Out] PointF [] pts, int count);
[DllImport (GdiPlus)]
- internal static extern Status GdipVectorTransformMatrixPointsI (IntPtr matrix, Point [] pts, int count);
+ internal static extern Status GdipVectorTransformMatrixPointsI (IntPtr matrix, [In, Out] Point [] pts, int count);
[DllImport (GdiPlus)]
internal static extern Status GdipIsMatrixInvertible (IntPtr matrix, out bool result);
[DllImport (GdiPlus)]
internal static extern Status GdipSetImageAttributesColorMatrix (IntPtr imageattr,
ColorAdjustType type, bool enableFlag, IntPtr colorMatrix,
- IntPtr grayMatrix, ColorMatrixFlag flags);
+ IntPtr grayMatrix, ColorMatrixFlag flags);
[DllImport (GdiPlus)]
internal static extern Status GdipSetImageAttributesGamma (IntPtr imageattr,
ColorAdjustType colorAdjustType);
[DllImport (GdiPlus)]
- internal static extern Status GdipSetImageAttributesWrapMode(IntPtr imageattr, WrapMode wrap,
+ internal static extern Status GdipSetImageAttributesWrapMode(IntPtr imageattr, WrapMode wrap,
int argb, bool clamp);
// Font
[DllImport(GdiPlus)]
- internal static extern Status GdipCreateFont (IntPtr fontFamily, float emSize, FontStyle style, GraphicsUnit unit, out IntPtr font);
+ internal static extern Status GdipCreateFont (IntPtr fontFamily, float emSize, FontStyle style, GraphicsUnit unit, out IntPtr font);
[DllImport(GdiPlus)]
internal static extern Status GdipDeleteFont (IntPtr font);
[DllImport(GdiPlus, CharSet=CharSet.Auto)]
// String Format
[DllImport (GdiPlus)]
- internal static extern Status GdipCreateStringFormat(int formatAttributes, int language, out IntPtr format);
+ internal static extern Status GdipCreateStringFormat(int formatAttributes, int language, out IntPtr format);
[DllImport (GdiPlus)]
internal static extern Status GdipStringFormatGetGenericDefault(out IntPtr format);
[DllImport (GdiPlus)]
private byte[] start_buf;
private int start_buf_pos;
private int start_buf_len;
- private byte[] managedBuf;
+ private byte[] managedBuf;
private const int default_bufsize = 4096;
public GdiPlusStreamHelper (Stream s, bool seekToOrigin)
}
}
- public int StreamGetHeaderImpl (IntPtr buf, int bufsz) {
+ public int StreamGetHeaderImpl (IntPtr buf, int bufsz) {
int bytesRead;
start_buf = new byte[bufsz];
}
}
- hash = new MD5CryptoServiceProvider().ComputeHash (pixels);
+ hash = MD5.Create ().ComputeHash (pixels);
return ByteArrayToString (hash);
}
public string RotateIndexedBmp (Bitmap src, RotateFlipType type)
if (pixel_data == null)
return "--ERROR--";
- byte[] hash = new MD5CryptoServiceProvider().ComputeHash (pixel_data);
+ byte[] hash = MD5.Create ().ComputeHash (pixel_data);
return ByteArrayToString (hash);
}
}\r
\r
[MonoTODO]\r
- public static void SetNamedProperty (string name, object property)\r
+ public static void SetNamedProperty (string name, object value)\r
{\r
throw new NotImplementedException ();\r
}\r
{\r
}\r
\r
- public RegistrationException (string msg, Exception innerException)\r
- : base (msg, innerException)\r
+ public RegistrationException (string msg, Exception inner)\r
+ : base (msg, inner)\r
{\r
}\r
\r
public CardSpacePolicyElement (
XmlElement target, XmlElement issuer,
Collection<XmlElement> parameters,
- Uri policyNoticeLink,
- int policyNoticeVersion,
+ Uri privacyNoticeLink,
+ int privacyNoticeVersion,
bool isManagedIssuer)
{
this.target = target;
this.issuer = issuer;
this.parameters = parameters ?? new Collection<XmlElement> ();
- this.policy_link = policyNoticeLink;
- policy_ver = policyNoticeVersion;
+ this.policy_link = privacyNoticeLink;
+ policy_ver = privacyNoticeVersion;
is_managed = isManagedIssuer;
}
[MonoTODO]
public static GenericXmlSecurityToken GetToken (
CardSpacePolicyElement [] policyChain,
- SecurityTokenSerializer serializer)
+ SecurityTokenSerializer tokenSerializer)
{
- return (GenericXmlSecurityToken) get_token.Invoke (impl, new object [] {policyChain, serializer});
+ return (GenericXmlSecurityToken) get_token.Invoke (impl, new object [] {policyChain, tokenSerializer});
}
public static GenericXmlSecurityToken GetToken (
XmlElement endpoint,
IEnumerable<XmlElement> policy,
XmlElement requiredRemoteTokenIssuer,
- SecurityTokenSerializer serializer)
+ SecurityTokenSerializer tokenSerializer)
{
CardSpacePolicyElement pe = new CardSpacePolicyElement (endpoint, requiredRemoteTokenIssuer, new Collection<XmlElement> (new List<XmlElement> (policy)), null, 0, requiredRemoteTokenIssuer != null);
- return GetToken (new CardSpacePolicyElement [] {pe}, serializer);
+ return GetToken (new CardSpacePolicyElement [] {pe}, tokenSerializer);
}
[MonoTODO]
}
[MonoTODO]
- public static Claim CreateDenyOnlyWindowsSidClaim (SecurityIdentifier identifier)
+ public static Claim CreateDenyOnlyWindowsSidClaim (SecurityIdentifier sid)
{
throw new NotImplementedException ();
}
}
public abstract IEnumerable<Claim> FindClaims (
- string resourceType, string right);
+ string claimType, string right);
public abstract IEnumerator<Claim> GetEnumerator ();
// Constructors
[MonoTODO]
- public WindowsClaimSet (WindowsIdentity identity)
+ public WindowsClaimSet (WindowsIdentity windowsIdentity)
{
throw new NotImplementedException ();
}
[MonoTODO]
- public WindowsClaimSet (WindowsIdentity identity, bool includeWindowsGroups)
+ public WindowsClaimSet (WindowsIdentity windowsIdentity, bool includeWindowsGroups)
{
throw new NotImplementedException ();
}
[MonoTODO]
- public WindowsClaimSet (WindowsIdentity identity, DateTime expirationTime)
+ public WindowsClaimSet (WindowsIdentity windowsIdentity, DateTime expirationTime)
{
throw new NotImplementedException ();
}
[MonoTODO]
- public WindowsClaimSet (WindowsIdentity identity, bool includeWindowsGroups, DateTime expirationTime)
+ public WindowsClaimSet (WindowsIdentity windowsIdentity, bool includeWindowsGroups, DateTime expirationTime)
{
throw new NotImplementedException ();
}
{
[MonoTODO]
public static AuthorizationContext
- CreateDefaultAuthorizationContext (IList<IAuthorizationPolicy> policies)
+ CreateDefaultAuthorizationContext (IList<IAuthorizationPolicy> authorizationPolicies)
{
- if (policies == null)
- throw new ArgumentNullException ("policies");
+ if (authorizationPolicies == null)
+ throw new ArgumentNullException ("authorizationPolicies");
string id = new UniqueId ().ToString ();
DefaultEvaluationContext ctx =
new DefaultEvaluationContext ();
- foreach (IAuthorizationPolicy a in policies) {
+ foreach (IAuthorizationPolicy a in authorizationPolicies) {
object o = null;
a.Evaluate (ctx, ref o);
}
public abstract ReadOnlyCollection<ClaimSet> ClaimSets { get; }
public abstract void AddClaimSet (
- IAuthorizationPolicy authorizationPolicy,
+ IAuthorizationPolicy policy,
ClaimSet claimSet);
- public abstract void RecordExpirationTime (DateTime time);
+ public abstract void RecordExpirationTime (DateTime expirationTime);
}
// default implementation
}
[MonoTODO]
- public KerberosSecurityTokenProvider (string servicePrincipalName, TokenImpersonationLevel tokenImpersonationLevel, NetworkCredential credential)
+ public KerberosSecurityTokenProvider (string servicePrincipalName, TokenImpersonationLevel tokenImpersonationLevel, NetworkCredential networkCredential)
{
name = servicePrincipalName;
impersonation_level = tokenImpersonationLevel;
- this.credential = credential;
+ this.credential = networkCredential;
}
string name;
public abstract SecurityTokenAuthenticator
CreateSecurityTokenAuthenticator (
- SecurityTokenRequirement requirement,
- out SecurityTokenResolver resolver);
+ SecurityTokenRequirement tokenRequirement,
+ out SecurityTokenResolver outOfBandTokenResolver);
public abstract SecurityTokenProvider
- CreateSecurityTokenProvider(SecurityTokenRequirement requirement);
+ CreateSecurityTokenProvider(SecurityTokenRequirement tokenRequirement);
public abstract SecurityTokenSerializer
CreateSecurityTokenSerializer (SecurityTokenVersion version);
EndCancelTokenCore (result);
}
- public SecurityToken RenewToken (TimeSpan timeout, SecurityToken token)
+ public SecurityToken RenewToken (TimeSpan timeout, SecurityToken tokenToBeRenewed)
{
- return RenewTokenCore (timeout, token);
+ return RenewTokenCore (timeout, tokenToBeRenewed);
}
public IAsyncResult BeginRenewToken (
- TimeSpan timeout, SecurityToken token,
+ TimeSpan timeout, SecurityToken tokenToBeRenewed,
AsyncCallback callback, object state)
{
- return BeginRenewTokenCore (timeout, token, callback, state);
+ return BeginRenewTokenCore (timeout, tokenToBeRenewed, callback, state);
}
public SecurityToken EndRenewToken (IAsyncResult result)
throw new NotSupportedException (String.Format ("Token cancellation on this security token provider '{0}' is not supported.", this));
}
- protected virtual SecurityToken RenewTokenCore (TimeSpan timeout, SecurityToken token)
+ protected virtual SecurityToken RenewTokenCore (TimeSpan timeout, SecurityToken tokenToBeRenewed)
{
throw new NotSupportedException (String.Format ("Token renewal on this security token provider '{0}' is not supported.", this));
}
protected virtual IAsyncResult BeginRenewTokenCore (
TimeSpan timeout,
- SecurityToken token,
+ SecurityToken tokenToBeRenewed,
AsyncCallback callback, object state)
{
throw new NotSupportedException (String.Format ("Token renewal on this security token provider '{0}' is not supported.", this));
}
}
- public TValue GetProperty<TValue> (string property)
+ public TValue GetProperty<TValue> (string propertyName)
{
TValue ret;
- if (TryGetProperty<TValue> (property, out ret))
+ if (TryGetProperty<TValue> (propertyName, out ret))
return ret;
- throw new ArgumentException (String.Format ("Property '{0}' was not found.", property));
+ throw new ArgumentException (String.Format ("Property '{0}' was not found.", propertyName));
}
- public bool TryGetProperty<TValue> (string property, out TValue value)
+ public bool TryGetProperty<TValue> (string propertyName, out TValue result)
{
object tmp;
- value = default (TValue);
+ result = default (TValue);
- if (!Properties.TryGetValue (property, out tmp))
+ if (!Properties.TryGetValue (propertyName, out tmp))
return false;
if (tmp == null && !typeof (TValue).IsValueType)
- value = default (TValue);
+ result = default (TValue);
else if (tmp is TValue)
- value = (TValue) tmp;
+ result = (TValue) tmp;
else
- throw new ArgumentException (String.Format ("The value of property '{0}' is of type '{1}', while '{2}' is expected.", property, tmp.GetType (), typeof (TValue)));
- return value != null;
+ throw new ArgumentException (String.Format ("The value of property '{0}' is of type '{1}', while '{2}' is expected.", propertyName, tmp.GetType (), typeof (TValue)));
+ return result != null;
}
}
}
return (byte []) GetRawBuffer ().Clone ();
}
- public override bool Matches (SecurityKeyIdentifierClause clause)
+ public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
{
BinaryKeyIdentifierClause other =
- clause as BinaryKeyIdentifierClause;
+ keyIdentifierClause as BinaryKeyIdentifierClause;
if (other == null)
return false;
return Matches (other.GetRawBuffer ());
-//
+//
// BootstrapContext.cs
//
// Author:
}
/// <summary>Initializes a new instance of the <see cref="BootstrapContext"/> class by using the specified security token and token handler.</summary>
- public BootstrapContext (SecurityToken token, SecurityTokenHandler handler)
+ public BootstrapContext (SecurityToken token, SecurityTokenHandler tokenHandler)
{
if (token == null)
throw new ArgumentNullException ("token");
- if (handler == null)
- throw new ArgumentNullException ("handler");
+ if (tokenHandler == null)
+ throw new ArgumentNullException ("tokenHandler");
SecurityToken = token;
- SecurityTokenHandler = handler;
+ SecurityTokenHandler = tokenHandler;
}
/// <summary>Initializes a new instance of the <see cref="BootstrapContext"/> class from a stream.</summary>
public EncryptedKeyIdentifierClause (
byte [] encryptedKey, string encryptionMethod,
- SecurityKeyIdentifier identifier)
- : this (encryptedKey, encryptionMethod, identifier, null)
+ SecurityKeyIdentifier encryptingKeyIdentifier)
+ : this (encryptedKey, encryptionMethod, encryptingKeyIdentifier, null)
{
}
public EncryptedKeyIdentifierClause (
byte [] encryptedKey, string encryptionMethod,
- SecurityKeyIdentifier identifier, string carriedKeyName)
- : this (encryptedKey, encryptionMethod, identifier, carriedKeyName, null, 0)
+ SecurityKeyIdentifier encryptingKeyIdentifier, string carriedKeyName)
+ : this (encryptedKey, encryptionMethod, encryptingKeyIdentifier, carriedKeyName, null, 0)
{
}
public EncryptedKeyIdentifierClause (
byte [] encryptedKey, string encryptionMethod,
- SecurityKeyIdentifier identifier, string carriedKeyName,
+ SecurityKeyIdentifier encryptingKeyIdentifier, string carriedKeyName,
byte [] derivationNonce, int derivationLength)
: base (encryptionMethod, encryptedKey, true, derivationNonce, derivationLength)
{
this.carried_key_name = carriedKeyName;
- this.identifier = identifier;
+ this.identifier = encryptingKeyIdentifier;
this.enc_method = encryptionMethod;
}
return true;
}
- public override bool Matches (SecurityKeyIdentifierClause clause)
+ public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
{
EncryptedKeyIdentifierClause e =
- clause as EncryptedKeyIdentifierClause;
+ keyIdentifierClause as EncryptedKeyIdentifierClause;
return e != null && Matches (e.GetRawBuffer (), e.EncryptionMethod, e.CarriedKeyName);
}
[MonoTODO]
public override bool MatchesKeyIdentifierClause (
- SecurityKeyIdentifierClause skiClause)
+ SecurityKeyIdentifierClause keyIdentifierClause)
{
throw new NotImplementedException ();
}
{
byte [] key;
- public InMemorySymmetricSecurityKey (byte [] key)
- : this (key, true)
+ public InMemorySymmetricSecurityKey (byte [] symmetricKey)
+ : this (symmetricKey, true)
{
}
- public InMemorySymmetricSecurityKey (byte [] key, bool clone)
+ public InMemorySymmetricSecurityKey (byte [] symmetricKey, bool cloneBuffer)
{
- if (key == null)
- throw new ArgumentNullException ("key");
- this.key = clone ? (byte []) key.Clone() : key;
+ if (symmetricKey == null)
+ throw new ArgumentNullException ("symmetricKey");
+ this.key = cloneBuffer ? (byte []) symmetricKey.Clone() : symmetricKey;
}
// SymmetricSecurityKey implementation
[MonoTODO]
public override bool MatchesKeyIdentifierClause (
- SecurityKeyIdentifierClause skiClause)
+ SecurityKeyIdentifierClause keyIdentifierClause)
{
throw new NotImplementedException ();
}
[MonoTODO]
public override bool MatchesKeyIdentifierClause (
- SecurityKeyIdentifierClause skiClause)
+ SecurityKeyIdentifierClause keyIdentifierClause)
{
throw new NotImplementedException ();
}
get { return owner_type; }
}
- public override bool Matches (SecurityKeyIdentifierClause clause)
+ public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
{
- if (clause == null)
- throw new ArgumentNullException ("clause");
+ if (keyIdentifierClause == null)
+ throw new ArgumentNullException ("keyIdentifierClause");
LocalIdKeyIdentifierClause c =
- clause as LocalIdKeyIdentifierClause;
+ keyIdentifierClause as LocalIdKeyIdentifierClause;
return c != null && Matches (c.LocalId, c.OwnerType);
}
throw new NotImplementedException ();
}
- public override bool Matches (SecurityKeyIdentifierClause clause)
+ public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
{
- if (clause == null)
- throw new ArgumentNullException ("clause");
+ if (keyIdentifierClause == null)
+ throw new ArgumentNullException ("keyIdentifierClause");
RsaKeyIdentifierClause rkic =
- clause as RsaKeyIdentifierClause;
+ keyIdentifierClause as RsaKeyIdentifierClause;
return rkic != null && Matches (rkic.Rsa);
}
[MonoTODO]
public override AsymmetricAlgorithm GetAsymmetricAlgorithm (
- string algorithm, bool privateKey)
+ string algorithm, bool requiresPrivateKey)
{
throw new NotImplementedException ();
}
[MonoTODO]
public override bool MatchesKeyIdentifierClause (
- SecurityKeyIdentifierClause skiClause)
+ SecurityKeyIdentifierClause keyIdentifierClause)
{
throw new NotImplementedException ();
}
public virtual void ReadXml (XmlDictionaryReader reader,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer,
+ SecurityTokenSerializer keyInfoSerializer,
SecurityTokenResolver outOfBandTokenResolver)
{
if (reader == null)
public virtual void WriteXml (XmlDictionaryWriter writer,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer)
+ SecurityTokenSerializer keyInfoSerializer)
{
if (writer == null)
throw new ArgumentNullException ("writer");
public virtual void ReadXml (XmlDictionaryReader reader,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer,
+ SecurityTokenSerializer keyInfoSerializer,
SecurityTokenResolver outOfBandTokenResolver)
{
if (reader == null)
switch (reader.LocalName) {
case "Assertion":
SamlAssertion a = new SamlAssertion ();
- a.ReadXml (reader, samlSerializer, keyInfoTokenSerializer, outOfBandTokenResolver);
+ a.ReadXml (reader, samlSerializer, keyInfoSerializer, outOfBandTokenResolver);
assertions.Add (a);
break;
case "AssertionIDReference":
public virtual void WriteXml (XmlDictionaryWriter writer,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer)
+ SecurityTokenSerializer keyInfoSerializer)
{
if (writer == null)
throw new ArgumentNullException ("writer");
foreach (string idref in AssertionIdReferences)
writer.WriteElementString ("saml", "AssertionIDReference", SamlConstants.Namespace, idref);
foreach (SamlAssertion assertion in Assertions)
- assertion.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+ assertion.WriteXml (writer, samlSerializer, keyInfoSerializer);
writer.WriteEndElement ();
}
}
}
public SamlAssertion (string assertionId, string issuer,
- DateTime issueInstant, SamlConditions conditions,
- SamlAdvice advice, IEnumerable<SamlStatement> statements)
+ DateTime issueInstant, SamlConditions samlConditions,
+ SamlAdvice samlAdvice, IEnumerable<SamlStatement> samlStatements)
{
if (IsInvalidAssertionId (assertionId))
throw new ArgumentException (String.Format ("The assertionId '{0}' must be a valid XML NCName.", assertionId));
if (issuer == null || issuer.Length == 0)
throw new ArgumentException ("issuer");
- if (statements == null)
- throw new ArgumentNullException ("statements");
+ if (samlStatements == null)
+ throw new ArgumentNullException ("samlStatements");
major = 1;
minor = 1;
assertion_id = assertionId;
this.issuer = issuer;
issue_instant = issueInstant;
- this.conditions = conditions;
- this.advice = advice;
- foreach (SamlStatement s in statements) {
+ this.conditions = samlConditions;
+ this.advice = samlAdvice;
+ foreach (SamlStatement s in samlStatements) {
if (s == null)
throw new ArgumentException ("statements contain null item.");
this.statements.Add (s);
[MonoTODO]
public virtual void ReadXml (XmlDictionaryReader reader,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer,
+ SecurityTokenSerializer keyInfoSerializer,
SecurityTokenResolver outOfBandTokenResolver)
{
throw new NotImplementedException ();
public virtual void WriteXml (XmlDictionaryWriter writer,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer)
+ SecurityTokenSerializer keyInfoSerializer)
{
if (writer == null)
throw new ArgumentNullException ("writer");
try {
if (Conditions != null)
- Conditions.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+ Conditions.WriteXml (writer, samlSerializer, keyInfoSerializer);
if (Advice != null)
- Advice.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+ Advice.WriteXml (writer, samlSerializer, keyInfoSerializer);
foreach (SamlStatement statement in Statements)
- statement.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+ statement.WriteXml (writer, samlSerializer, keyInfoSerializer);
} catch (NotImplementedException) {
throw;
} catch (Exception ex) { // bad catch, eh?
[MonoTODO]
protected void ReadSignature (XmlDictionaryReader reader,
- SecurityTokenSerializer keyInfoTokenSerializer,
+ SecurityTokenSerializer keyInfoSerializer,
SecurityTokenResolver outOfBandTokenResolver,
SamlSerializer samlSerializer)
{
}
[MonoTODO]
- public override bool Matches (SecurityKeyIdentifierClause clause)
+ public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual void ReadXml (XmlDictionaryReader reader,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer,
+ SecurityTokenSerializer keyInfoSerializer,
SecurityTokenResolver outOfBandTokenResolver)
{
throw new NotImplementedException ();
public virtual void WriteXml (XmlDictionaryWriter writer,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer)
+ SecurityTokenSerializer keyInfoSerializer)
{
writer.WriteStartElement ("saml", "Attribute", SamlConstants.Namespace);
writer.WriteAttributeString ("AttributeName", Name);
[MonoTODO]
public override void ReadXml (XmlDictionaryReader reader,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer,
+ SecurityTokenSerializer keyInfoSerializer,
SecurityTokenResolver outOfBandTokenResolver)
{
throw new NotImplementedException ();
public override void WriteXml (XmlDictionaryWriter writer,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer)
+ SecurityTokenSerializer keyInfoSerializer)
{
if (SamlSubject == null)
throw new SecurityTokenException ("Subject is null in the AttributeStatement");
writer.WriteStartElement ("saml", "AttributeStatement", SamlConstants.Namespace);
- SamlSubject.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+ SamlSubject.WriteXml (writer, samlSerializer, keyInfoSerializer);
foreach (SamlAttribute a in Attributes)
- a.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+ a.WriteXml (writer, samlSerializer, keyInfoSerializer);
writer.WriteEndElement ();
}
[MonoTODO]
public override void ReadXml (XmlDictionaryReader reader,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer,
+ SecurityTokenSerializer keyInfoSerializer,
SecurityTokenResolver outOfBandTokenResolver)
{
throw new NotImplementedException ();
public override void WriteXml (XmlDictionaryWriter writer,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer)
+ SecurityTokenSerializer keyInfoSerializer)
{
if (writer == null)
throw new ArgumentNullException ("writer");
writer.WriteAttributeString ("AuthenticationMethod", AuthenticationMethod);
writer.WriteAttributeString ("AuthenticationInstant",
AuthenticationInstant.ToString (SamlConstants.DateFormat, CultureInfo.InvariantCulture));
- SamlSubject.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+ SamlSubject.WriteXml (writer, samlSerializer, keyInfoSerializer);
if (DnsAddress != null || IPAddress != null) {
writer.WriteStartElement ("saml", "SubjectLocality", SamlConstants.Namespace);
if (IPAddress != null)
{
}
- public SamlAuthorityBinding (XmlQualifiedName kind, string binding, string location)
+ public SamlAuthorityBinding (XmlQualifiedName authorityKind, string binding, string location)
{
- if (kind == null)
- throw new ArgumentNullException ("kind");
- AuthorityKind = kind;
+ if (authorityKind == null)
+ throw new ArgumentNullException ("authorityKind");
+ AuthorityKind = authorityKind;
Binding = binding;
Location = location;
}
public class SamlAuthorizationDecisionClaimResource
{
public SamlAuthorizationDecisionClaimResource (
- string resource, SamlAccessDecision decision, string actionName, string actionNamespace)
+ string resource, SamlAccessDecision accessDecision, string actionNamespace, string actionName)
{
this.resource = resource;
- this.decision = decision;
+ this.decision = accessDecision;
this.name = actionName;
this.ns = actionNamespace;
}
public override void ReadXml (XmlDictionaryReader reader,
SamlSerializer samlSerializer,
SecurityTokenSerializer keyInfoSerializer,
- SecurityTokenResolver resolver)
+ SecurityTokenResolver outOfBandTokenResolver)
{
if (reader == null)
throw new ArgumentNullException ("reader");
reader.MoveToContent ();
SamlSubject = new SamlSubject ();
- SamlSubject.ReadXml (reader, samlSerializer, keyInfoSerializer, resolver);
+ SamlSubject.ReadXml (reader, samlSerializer, keyInfoSerializer, outOfBandTokenResolver);
SamlActions.Clear ();
for (reader.MoveToContent ();
reader.LocalName == "Action" &&
reader.NamespaceURI == SamlConstants.Namespace;
reader.MoveToContent ()) {
SamlAction action = new SamlAction ();
- action.ReadXml (reader, samlSerializer, keyInfoSerializer, resolver);
+ action.ReadXml (reader, samlSerializer, keyInfoSerializer, outOfBandTokenResolver);
SamlActions.Add (action);
}
if (reader.LocalName == "Evidence" &&
reader.NamespaceURI == SamlConstants.Namespace) {
Evidence = new SamlEvidence ();
- Evidence.ReadXml (reader, samlSerializer, keyInfoSerializer, resolver);
+ Evidence.ReadXml (reader, samlSerializer, keyInfoSerializer, outOfBandTokenResolver);
reader.MoveToContent ();
}
reader.ReadEndElement ();
[MonoTODO]
public virtual void ReadXml (XmlDictionaryReader reader,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer,
+ SecurityTokenSerializer keyInfoSerializer,
SecurityTokenResolver outOfBandTokenResolver)
{
throw new NotImplementedException ();
public virtual void WriteXml (XmlDictionaryWriter writer,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer)
+ SecurityTokenSerializer keyInfoSerializer)
{
if (writer == null)
throw new ArgumentNullException ("writer");
if (has_not_on_after)
writer.WriteAttributeString ("NotOnOrAfter", NotOnOrAfter.ToString (SamlConstants.DateFormat, invariant));
foreach (SamlCondition cond in Conditions)
- cond.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+ cond.WriteXml (writer, samlSerializer, keyInfoSerializer);
writer.WriteEndElement ();
}
}
public virtual void ReadXml (XmlDictionaryReader reader,
SamlSerializer samlSerializer,
SecurityTokenSerializer keyInfoSerializer,
- SecurityTokenResolver resolver)
+ SecurityTokenResolver outOfBandTokenResolver)
{
if (reader == null)
throw new ArgumentNullException ("reader");
switch (reader.LocalName) {
case "Assertion":
SamlAssertion a = new SamlAssertion ();
- a.ReadXml (reader, samlSerializer, keyInfoSerializer, resolver);
+ a.ReadXml (reader, samlSerializer, keyInfoSerializer, outOfBandTokenResolver);
assertions.Add (a);
break;
case "AssertionIDReference":
[MonoTODO]
public override bool MatchesKeyIdentifierClause (
- SecurityKeyIdentifierClause skiClause)
+ SecurityKeyIdentifierClause keyIdentifierClause)
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual SamlAdvice LoadAdvice (XmlDictionaryReader reader,
- SecurityTokenSerializer tokenSerializer,
- SecurityTokenResolver tokenResolver)
+ SecurityTokenSerializer keyInfoSerializer,
+ SecurityTokenResolver outOfBandTokenResolver)
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual SamlAssertion LoadAssertion (XmlDictionaryReader reader,
- SecurityTokenSerializer tokenSerializer,
- SecurityTokenResolver tokenResolver)
+ SecurityTokenSerializer keyInfoSerializer,
+ SecurityTokenResolver outOfBandTokenResolver)
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual SamlAttribute LoadAttribute (XmlDictionaryReader reader,
- SecurityTokenSerializer tokenSerializer,
- SecurityTokenResolver tokenResolver)
+ SecurityTokenSerializer keyInfoSerializer,
+ SecurityTokenResolver outOfBandTokenResolver)
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual SamlCondition LoadCondition (XmlDictionaryReader reader,
- SecurityTokenSerializer tokenSerializer,
- SecurityTokenResolver tokenResolver)
+ SecurityTokenSerializer keyInfoSerializer,
+ SecurityTokenResolver outOfBandTokenResolver)
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual SamlConditions LoadConditions (XmlDictionaryReader reader,
- SecurityTokenSerializer tokenSerializer,
- SecurityTokenResolver tokenResolver)
+ SecurityTokenSerializer keyInfoSerializer,
+ SecurityTokenResolver outOfBandTokenResolver)
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual SamlStatement LoadStatement (XmlDictionaryReader reader,
- SecurityTokenSerializer tokenSerializer,
- SecurityTokenResolver tokenResolver)
+ SecurityTokenSerializer keyInfoSerializer,
+ SecurityTokenResolver outOfBandTokenResolver)
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual SamlSecurityToken ReadToken (XmlReader reader,
- SecurityTokenSerializer tokenSerializer,
- SecurityTokenResolver tokenResolver)
+ SecurityTokenSerializer keyInfoSerializer,
+ SecurityTokenResolver outOfBandTokenResolver)
{
throw new NotImplementedException ();
}
public abstract void ReadXml (XmlDictionaryReader reader,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer,
+ SecurityTokenSerializer keyInfoSerializer,
SecurityTokenResolver outOfBandTokenResolver);
public abstract void WriteXml (XmlDictionaryWriter writer,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer);
+ SecurityTokenSerializer keyInfoSerializer);
}
}
public virtual void ReadXml (XmlDictionaryReader reader,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer,
+ SecurityTokenSerializer keyInfoSerializer,
SecurityTokenResolver outOfBandTokenResolver)
{
if (reader == null)
public virtual void WriteXml (XmlDictionaryWriter writer,
SamlSerializer samlSerializer,
- SecurityTokenSerializer keyInfoTokenSerializer)
+ SecurityTokenSerializer keyInfoSerializer)
{
if (writer == null)
throw new ArgumentNullException ("writer");
this.list = new List<SecurityKeyIdentifierClause> ();
}
- public SecurityKeyIdentifier (params SecurityKeyIdentifierClause [] identifiers)
+ public SecurityKeyIdentifier (params SecurityKeyIdentifierClause [] clauses)
{
- this.list = new List<SecurityKeyIdentifierClause> (identifiers);
+ this.list = new List<SecurityKeyIdentifierClause> (clauses);
}
List<SecurityKeyIdentifierClause> list;
get { return is_readonly; }
}
- public SecurityKeyIdentifierClause this [int i] {
- get { return list [i]; }
+ public SecurityKeyIdentifierClause this [int index] {
+ get { return list [index]; }
}
- public void Add (SecurityKeyIdentifierClause item)
+ public void Add (SecurityKeyIdentifierClause clause)
{
if (is_readonly)
throw new InvalidOperationException ("This SecurityKeyIdentifier is read-only.");
- list.Add (item);
+ list.Add (clause);
}
public SecurityKey CreateKey ()
return sb.ToString ();
}
- public bool TryFind<TClause> (out TClause result)
+ public bool TryFind<TClause> (out TClause clause)
where TClause : SecurityKeyIdentifierClause
{
- result = default (TClause);
+ clause = default (TClause);
foreach (SecurityKeyIdentifierClause kic in this)
if (typeof (TClause).IsAssignableFrom (kic.GetType ())) {
- result = (TClause) kic;
+ clause = (TClause) kic;
return true;
}
return false;
this.clause_type = clauseType;
}
- protected SecurityKeyIdentifierClause (string clauseType, byte [] derivationNonce, int derivationLength)
+ protected SecurityKeyIdentifierClause (string clauseType, byte [] nonce, int length)
{
this.clause_type = clauseType;
- if (derivationNonce != null)
- this.nonce = (byte []) derivationNonce.Clone ();
- this.deriv_length = derivationLength;
+ if (nonce != null)
+ this.nonce = (byte []) nonce.Clone ();
+ this.deriv_length = length;
}
string clause_type;
}
[MonoTODO]
- public virtual bool Matches (SecurityKeyIdentifierClause clause)
+ public virtual bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
{
throw new NotImplementedException ();
}
}
public virtual bool MatchesKeyIdentifierClause (
- SecurityKeyIdentifierClause skiClause)
+ SecurityKeyIdentifierClause keyIdentifierClause)
{
return false;
}
[MonoTODO]
public virtual SecurityKey ResolveKeyIdentifierClause (
- SecurityKeyIdentifierClause skiClause)
+ SecurityKeyIdentifierClause keyIdentifierClause)
{
- if (skiClause == null)
- throw new ArgumentNullException ("skiClause");
- if (!MatchesKeyIdentifierClause (skiClause))
- throw new InvalidOperationException (String.Format ("This '{0}' security token does not support resolving '{1}' key identifier clause.", GetType (), skiClause));
- if (skiClause.CanCreateKey)
- return skiClause.CreateKey ();
+ if (keyIdentifierClause == null)
+ throw new ArgumentNullException ("keyIdentifierClause");
+ if (!MatchesKeyIdentifierClause (keyIdentifierClause))
+ throw new InvalidOperationException (String.Format ("This '{0}' security token does not support resolving '{1}' key identifier clause.", GetType (), keyIdentifierClause));
+ if (keyIdentifierClause.CanCreateKey)
+ return keyIdentifierClause.CreateKey ();
// FIXME: examine it.
if (SecurityKeys.Count == 0)
- throw new InvalidOperationException (String.Format ("This '{0}' security token does not have any keys that can be resolved.", GetType (), skiClause));
+ throw new InvalidOperationException (String.Format ("This '{0}' security token does not have any keys that can be resolved.", GetType (), keyIdentifierClause));
return SecurityKeys [0];
}
}
public class SecurityTokenException : SystemException
{
public SecurityTokenException () : base () {}
- public SecurityTokenException (string msg) : base (msg) {}
- public SecurityTokenException (string msg, Exception inner) : base (msg, inner) {}
+ public SecurityTokenException (string message) : base (message) {}
+ public SecurityTokenException (string message, Exception innerException) : base (message, innerException) {}
protected SecurityTokenException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
-//
+//
// SecurityTokenExpiredException.cs
//
// Author:
: base(message)
{ }
- public SecurityTokenExpiredException(string message, Exception innerException)
- : base(message, innerException)
+ public SecurityTokenExpiredException(string message, Exception inner)
+ : base(message, inner)
{ }
public SecurityTokenExpiredException(SerializationInfo info, StreamingContext context)
-//
+//
// SecurityTokenNotYetValidException.cs
//
// Author:
: base(message)
{ }
- public SecurityTokenNotYetValidException(string message, Exception innerException)
- : base(message, innerException)
+ public SecurityTokenNotYetValidException(string message, Exception inner)
+ : base(message, inner)
{ }
public SecurityTokenNotYetValidException(SerializationInfo info, StreamingContext context)
-//
+//
// SecurityTokenReplayDetectedException.cs
//
// Author:
: base(message)
{ }
- public SecurityTokenReplayDetectedException(string message, Exception innerException)
- : base(message, innerException)
+ public SecurityTokenReplayDetectedException(string message, Exception inner)
+ : base(message, inner)
{ }
public SecurityTokenReplayDetectedException(SerializationInfo info, StreamingContext context)
public class SecurityTokenValidationException : SecurityTokenException
{
public SecurityTokenValidationException () : base () {}
- public SecurityTokenValidationException (string msg) : base (msg) {}
- public SecurityTokenValidationException (string msg, Exception inner) : base (msg, inner) {}
+ public SecurityTokenValidationException (string message) : base (message) {}
+ public SecurityTokenValidationException (string message, Exception innerException) : base (message, innerException) {}
protected SecurityTokenValidationException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
}
[MonoTODO]
- public WindowsSecurityToken (WindowsIdentity identity)
+ public WindowsSecurityToken (WindowsIdentity windowsIdentity)
{
throw new NotImplementedException ();
}
- public WindowsSecurityToken (WindowsIdentity identity, string id)
+ public WindowsSecurityToken (WindowsIdentity windowsIdentity, string id)
{
- this.identity = identity;
+ this.identity = windowsIdentity;
this.id = id;
}
get { return serial; }
}
- public override bool Matches (SecurityKeyIdentifierClause clause)
+ public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
{
X509IssuerSerialKeyIdentifierClause other =
- clause as X509IssuerSerialKeyIdentifierClause;
+ keyIdentifierClause as X509IssuerSerialKeyIdentifierClause;
return other != null && Matches (other.name, other.serial);
}
[MonoTODO]
public override bool MatchesKeyIdentifierClause (
- SecurityKeyIdentifierClause skiClause)
+ SecurityKeyIdentifierClause keyIdentifierClause)
{
LocalIdKeyIdentifierClause l =
- skiClause as LocalIdKeyIdentifierClause;
+ keyIdentifierClause as LocalIdKeyIdentifierClause;
if (l != null)
return l.LocalId == Id;
X509ThumbprintKeyIdentifierClause t =
- skiClause as X509ThumbprintKeyIdentifierClause;
+ keyIdentifierClause as X509ThumbprintKeyIdentifierClause;
if (t != null)
return t.Matches (cert);
X509IssuerSerialKeyIdentifierClause i =
- skiClause as X509IssuerSerialKeyIdentifierClause;
+ keyIdentifierClause as X509IssuerSerialKeyIdentifierClause;
if (i != null)
return i.Matches (cert);
X509SubjectKeyIdentifierClause s =
- skiClause as X509SubjectKeyIdentifierClause;
+ keyIdentifierClause as X509SubjectKeyIdentifierClause;
if (s != null)
return s.Matches (cert);
X509RawDataKeyIdentifierClause r =
- skiClause as X509RawDataKeyIdentifierClause;
+ keyIdentifierClause as X509RawDataKeyIdentifierClause;
if (r != null)
return r.Matches (cert);
public class X509SubjectKeyIdentifierClause : BinaryKeyIdentifierClause
{
[MonoTODO]
- public X509SubjectKeyIdentifierClause (byte [] certificateSubject)
- : base (null, certificateSubject, true)
+ public X509SubjectKeyIdentifierClause (byte [] ski)
+ : base (null, ski, true)
{
throw new NotImplementedException ();
}
}
[MonoTODO]
- public static bool TryCreateFrom (X509Certificate2 certificate, out X509SubjectKeyIdentifierClause clause)
+ public static bool TryCreateFrom (X509Certificate2 certificate, out X509SubjectKeyIdentifierClause keyIdentifierClause)
{
throw new NotImplementedException ();
}
{
public class X509ThumbprintKeyIdentifierClause : BinaryKeyIdentifierClause
{
- public X509ThumbprintKeyIdentifierClause (byte [] certificateThumbprint)
- : base (null, certificateThumbprint, true)
+ public X509ThumbprintKeyIdentifierClause (byte [] thumbprint)
+ : base (null, thumbprint, true)
{
}
public class X509WindowsSecurityToken : X509SecurityToken
{
[MonoTODO]
- public X509WindowsSecurityToken (X509Certificate2 cert, WindowsIdentity identity)
- : base (cert)
+ public X509WindowsSecurityToken (X509Certificate2 certificate, WindowsIdentity windowsIdentity)
+ : base (certificate)
{
throw new NotImplementedException ();
}
- public X509WindowsSecurityToken (X509Certificate2 cert, WindowsIdentity identity, string id)
- : base (cert, id)
+ public X509WindowsSecurityToken (X509Certificate2 certificate, WindowsIdentity windowsIdentity, string id)
+ : base (certificate, id)
{
- this.identity = identity;
+ this.identity = windowsIdentity;
}
WindowsIdentity identity;
-//
+//
// SignatureVerificationFailedException.cs
//
// Author:
: base(message)
{ }
- public SignatureVerificationFailedException(string message, Exception innerException)
- : base(message, innerException)
+ public SignatureVerificationFailedException(string message, Exception inner)
+ : base(message, inner)
{ }
public SignatureVerificationFailedException(SerializationInfo info, StreamingContext context)
throw new NotImplementedException ();
}
- public virtual void Add (string methodName, ManagementBaseObject inParams, ManagementBaseObject outParams)
+ public virtual void Add (string methodName, ManagementBaseObject inParameters, ManagementBaseObject outParameters)
{
throw new NotImplementedException ();
}
_info = new SignerInfoCollection ();
}
- public SignedCms (ContentInfo content)
- : this (content, false)
+ public SignedCms (ContentInfo contentInfo)
+ : this (contentInfo, false)
{
}
- public SignedCms (ContentInfo content, bool detached)
+ public SignedCms (ContentInfo contentInfo, bool detached)
: this ()
{
- if (content == null)
- throw new ArgumentNullException ("content");
+ if (contentInfo == null)
+ throw new ArgumentNullException ("contentInfo");
- _content = content;
+ _content = contentInfo;
_detached = detached;
}
_type = signerIdentifierType;
}
- public SignedCms (SubjectIdentifierType signerIdentifierType, ContentInfo content)
- : this (content, false)
+ public SignedCms (SubjectIdentifierType signerIdentifierType, ContentInfo contentInfo)
+ : this (contentInfo, false)
{
_type = signerIdentifierType;
}
- public SignedCms (SubjectIdentifierType signerIdentifierType, ContentInfo content, bool detached)
- : this (content, detached)
+ public SignedCms (SubjectIdentifierType signerIdentifierType, ContentInfo contentInfo, bool detached)
+ : this (contentInfo, detached)
{
_type = signerIdentifierType;
}
{
}
- public CipherReference (string uri, TransformChain tc)
- : base (uri, tc)
+ public CipherReference (string uri, TransformChain transformChain)
+ : base (uri, transformChain)
{
}
ReferenceType = XmlEncryption.ElementNames.DataReference;
}
- public DataReference (string uri, TransformChain tc)
- : base (uri, tc)
+ public DataReference (string uri, TransformChain transformChain)
+ : base (uri, transformChain)
{
ReferenceType = XmlEncryption.ElementNames.DataReference;
}
TransformChain = new TransformChain ();
}
- protected EncryptedReference (string uri, TransformChain tc)
+ protected EncryptedReference (string uri, TransformChain transformChain)
: this ()
{
Uri = uri;
- TransformChain = tc;
+ TransformChain = transformChain;
}
#endregion // Constructors
keyNameMapping.Clear ();
}
- public byte[] DecryptData (EncryptedData encryptedData, SymmetricAlgorithm symAlg)
+ public byte[] DecryptData (EncryptedData encryptedData, SymmetricAlgorithm symmetricAlgorithm)
{
if (encryptedData == null)
throw new ArgumentNullException ("encryptedData");
- if (symAlg == null)
- throw new ArgumentNullException ("symAlg");
+ if (symmetricAlgorithm == null)
+ throw new ArgumentNullException ("symmetricAlgorithm");
- PaddingMode bak = symAlg.Padding;
+ PaddingMode bak = symmetricAlgorithm.Padding;
try {
- symAlg.Padding = Padding;
- return Transform (encryptedData.CipherData.CipherValue, symAlg.CreateDecryptor (), symAlg.BlockSize / 8, true);
+ symmetricAlgorithm.Padding = Padding;
+ return Transform (encryptedData.CipherData.CipherValue, symmetricAlgorithm.CreateDecryptor (), symmetricAlgorithm.BlockSize / 8, true);
} finally {
- symAlg.Padding = bak;
+ symmetricAlgorithm.Padding = bak;
}
}
return DecryptKey (encryptedKey.CipherData.CipherValue, (SymmetricAlgorithm) keyAlg);
}
- public static byte[] DecryptKey (byte[] keyData, SymmetricAlgorithm symAlg)
+ public static byte[] DecryptKey (byte[] keyData, SymmetricAlgorithm symmetricAlgorithm)
{
if (keyData == null)
throw new ArgumentNullException ("keyData");
- if (symAlg == null)
- throw new ArgumentNullException ("symAlg");
+ if (symmetricAlgorithm == null)
+ throw new ArgumentNullException ("symmetricAlgorithm");
- if (symAlg is TripleDES)
- return SymmetricKeyWrap.TripleDESKeyWrapDecrypt (symAlg.Key, keyData);
- if (symAlg is Rijndael)
- return SymmetricKeyWrap.AESKeyWrapDecrypt (symAlg.Key, keyData);
+ if (symmetricAlgorithm is TripleDES)
+ return SymmetricKeyWrap.TripleDESKeyWrapDecrypt (symmetricAlgorithm.Key, keyData);
+ if (symmetricAlgorithm is Rijndael)
+ return SymmetricKeyWrap.AESKeyWrapDecrypt (symmetricAlgorithm.Key, keyData);
throw new CryptographicException ("The specified cryptographic transform is not supported.");
}
[MonoTODO ("Test this.")]
- public static byte[] DecryptKey (byte[] keyData, RSA rsa, bool fOAEP)
+ public static byte[] DecryptKey (byte[] keyData, RSA rsa, bool useOAEP)
{
AsymmetricKeyExchangeDeformatter deformatter = null;
- if (fOAEP)
+ if (useOAEP)
deformatter = new RSAOAEPKeyExchangeDeformatter (rsa);
else
deformatter = new RSAPKCS1KeyExchangeDeformatter (rsa);
throw new NotImplementedException ();
}
- public byte[] EncryptData (byte[] plainText, SymmetricAlgorithm symAlg)
+ public byte[] EncryptData (byte[] plaintext, SymmetricAlgorithm symmetricAlgorithm)
{
- if (plainText == null)
- throw new ArgumentNullException ("plainText");
- if (symAlg == null)
- throw new ArgumentNullException ("symAlg");
+ if (plaintext == null)
+ throw new ArgumentNullException ("plaintext");
+ if (symmetricAlgorithm == null)
+ throw new ArgumentNullException ("symmetricAlgorithm");
- PaddingMode bak = symAlg.Padding;
+ PaddingMode bak = symmetricAlgorithm.Padding;
try {
- symAlg.Padding = Padding;
- return EncryptDataCore (plainText, symAlg);
+ symmetricAlgorithm.Padding = Padding;
+ return EncryptDataCore (plaintext, symmetricAlgorithm);
} finally {
- symAlg.Padding = bak;
+ symmetricAlgorithm.Padding = bak;
}
}
return output;
}
- public byte[] EncryptData (XmlElement inputElement, SymmetricAlgorithm symAlg, bool content)
+ public byte[] EncryptData (XmlElement inputElement, SymmetricAlgorithm symmetricAlgorithm, bool content)
{
if (inputElement == null)
throw new ArgumentNullException ("inputElement");
if (content)
- return EncryptData (Encoding.GetBytes (inputElement.InnerXml), symAlg);
+ return EncryptData (Encoding.GetBytes (inputElement.InnerXml), symmetricAlgorithm);
else
- return EncryptData (Encoding.GetBytes (inputElement.OuterXml), symAlg);
+ return EncryptData (Encoding.GetBytes (inputElement.OuterXml), symmetricAlgorithm);
}
- public static byte[] EncryptKey (byte[] keyData, SymmetricAlgorithm symAlg)
+ public static byte[] EncryptKey (byte[] keyData, SymmetricAlgorithm symmetricAlgorithm)
{
if (keyData == null)
throw new ArgumentNullException ("keyData");
- if (symAlg == null)
- throw new ArgumentNullException ("symAlg");
+ if (symmetricAlgorithm == null)
+ throw new ArgumentNullException ("symmetricAlgorithm");
- if (symAlg is TripleDES)
- return SymmetricKeyWrap.TripleDESKeyWrapEncrypt (symAlg.Key, keyData);
- if (symAlg is Rijndael)
- return SymmetricKeyWrap.AESKeyWrapEncrypt (symAlg.Key, keyData);
+ if (symmetricAlgorithm is TripleDES)
+ return SymmetricKeyWrap.TripleDESKeyWrapEncrypt (symmetricAlgorithm.Key, keyData);
+ if (symmetricAlgorithm is Rijndael)
+ return SymmetricKeyWrap.AESKeyWrapEncrypt (symmetricAlgorithm.Key, keyData);
throw new CryptographicException ("The specified cryptographic transform is not supported.");
}
[MonoTODO ("Test this.")]
- public static byte[] EncryptKey (byte[] keyData, RSA rsa, bool fOAEP)
+ public static byte[] EncryptKey (byte[] keyData, RSA rsa, bool useOAEP)
{
AsymmetricKeyExchangeFormatter formatter = null;
- if (fOAEP)
+ if (useOAEP)
formatter = new RSAOAEPKeyExchangeFormatter (rsa);
else
formatter = new RSAPKCS1KeyExchangeFormatter (rsa);
throw new ArgumentException ("keyAlg");
}
- public virtual byte[] GetDecryptionIV (EncryptedData encryptedData, string symAlgUri)
+ public virtual byte[] GetDecryptionIV (EncryptedData encryptedData, string symmetricAlgorithmUri)
{
if (encryptedData == null)
throw new ArgumentNullException ("encryptedData");
- SymmetricAlgorithm symAlg = GetAlgorithm (symAlgUri);
+ SymmetricAlgorithm symAlg = GetAlgorithm (symmetricAlgorithmUri);
byte[] iv = new Byte [symAlg.BlockSize / 8];
Buffer.BlockCopy (encryptedData.CipherData.CipherValue, 0, iv, 0, iv.Length);
return iv;
}
- public virtual SymmetricAlgorithm GetDecryptionKey (EncryptedData encryptedData, string symAlgUri)
+ public virtual SymmetricAlgorithm GetDecryptionKey (EncryptedData encryptedData, string symmetricAlgorithmUri)
{
if (encryptedData == null)
throw new ArgumentNullException ("encryptedData");
- if (symAlgUri == null)
+ if (symmetricAlgorithmUri == null)
return null;
- SymmetricAlgorithm symAlg = GetAlgorithm (symAlgUri);
+ SymmetricAlgorithm symAlg = GetAlgorithm (symmetricAlgorithmUri);
symAlg.IV = GetDecryptionIV (encryptedData, encryptedData.EncryptionMethod.KeyAlgorithm);
KeyInfo keyInfo = encryptedData.KeyInfo;
foreach (KeyInfoClause clause in keyInfo) {
KeyAlgorithm = null;
}
- public EncryptionMethod (string strAlgorithm)
+ public EncryptionMethod (string algorithm)
{
- KeyAlgorithm = strAlgorithm;
+ KeyAlgorithm = algorithm;
}
#endregion // Constructors
{
}
- public EncryptionProperty (XmlElement elemProp)
+ public EncryptionProperty (XmlElement elementProperty)
{
- LoadXml (elemProp);
+ LoadXml (elementProperty);
}
#endregion // Constructors
{
}
- public KeyInfoEncryptedKey (EncryptedKey ek)
+ public KeyInfoEncryptedKey (EncryptedKey encryptedKey)
{
- EncryptedKey = ek;
+ EncryptedKey = encryptedKey;
}
#endregion // Constructors
URI = strUri;
}
- public KeyInfoRetrievalMethod (string strUri, string strType)
+ public KeyInfoRetrievalMethod (string strUri, string typeName)
: this (strUri)
{
- Type = strType;
+ Type = typeName;
}
[ComVisible (false)]
ReferenceType = XmlEncryption.ElementNames.KeyReference;
}
- public KeyReference (string uri, TransformChain tc)
- : base (uri, tc)
+ public KeyReference (string uri, TransformChain transformChain)
+ : base (uri, transformChain)
{
ReferenceType = XmlEncryption.ElementNames.KeyReference;
}
_flags = DataProtectionPermissionFlags.AllFlags;
}
- public DataProtectionPermission (DataProtectionPermissionFlags flags)
+ public DataProtectionPermission (DataProtectionPermissionFlags flag)
{
// reuse validation by the Flags property
- Flags = flags;
+ Flags = flag;
}
return ((_flags & ~dp._flags) == 0);
}
- public override void FromXml (SecurityElement e)
+ public override void FromXml (SecurityElement securityElement)
{
// General validation in CodeAccessPermission
- PermissionHelper.CheckSecurityElement (e, "e", version, version);
+ PermissionHelper.CheckSecurityElement (securityElement, "securityElement", version, version);
// Note: we do not (yet) care about the return value
// as we only accept version 1 (min/max values)
_flags = (DataProtectionPermissionFlags) Enum.Parse (
- typeof (DataProtectionPermissionFlags), e.Attribute ("Flags"));
+ typeof (DataProtectionPermissionFlags), securityElement.Attribute ("Flags"));
}
public override SecurityElement ToXml ()
// It seems to do nothing.
}
- protected override void OnInitializeAndValidate (ServiceEndpointElement channelEndpointElement)
+ protected override void OnInitializeAndValidate (ServiceEndpointElement serviceEndpointElement)
{
// It seems to do nothing.
}
base.OnInitializeAndValidate (channelEndpointElement);
}
- protected override void OnInitializeAndValidate (ServiceEndpointElement channelEndpointElement)
+ protected override void OnInitializeAndValidate (ServiceEndpointElement serviceEndpointElement)
{
// It seems to do nothing.
- base.OnInitializeAndValidate (channelEndpointElement);
+ base.OnInitializeAndValidate (serviceEndpointElement);
}
}
}
base.OnInitializeAndValidate (channelEndpointElement);
}
- protected override void OnInitializeAndValidate (ServiceEndpointElement channelEndpointElement)
+ protected override void OnInitializeAndValidate (ServiceEndpointElement serviceEndpointElement)
{
// It seems to do nothing.
- base.OnInitializeAndValidate (channelEndpointElement);
+ base.OnInitializeAndValidate (serviceEndpointElement);
}
}
}
{
}
- public Atom10ItemFormatter (SyndicationItem feedToWrite)
- : base (feedToWrite)
+ public Atom10ItemFormatter (SyndicationItem itemToWrite)
+ : base (itemToWrite)
{
}
return new XmlSyndicationContent (null, xmlSerializerObject, serializer);
}
- public static XmlSyndicationContent CreateXmlContent (XmlReader reader)
+ public static XmlSyndicationContent CreateXmlContent (XmlReader xmlReader)
{
- return new XmlSyndicationContent (reader);
+ return new XmlSyndicationContent (xmlReader);
}
#endregion
{
}
- public SyndicationItem (string title, string content, Uri feedAlternateLink)
- : this (title, content, feedAlternateLink, null, default (DateTimeOffset))
+ public SyndicationItem (string title, string content, Uri itemAlternateLink)
+ : this (title, content, itemAlternateLink, null, default (DateTimeOffset))
{
}
- public SyndicationItem (string title, string content, Uri feedAlternateLink, string id,
+ public SyndicationItem (string title, string content, Uri itemAlternateLink, string id,
DateTimeOffset lastUpdatedTime)
- : this (title, content != null ? SyndicationContent.CreatePlaintextContent (content) : null, feedAlternateLink, id, lastUpdatedTime)
+ : this (title, content != null ? SyndicationContent.CreatePlaintextContent (content) : null, itemAlternateLink, id, lastUpdatedTime)
{
}
- public SyndicationItem (string title, SyndicationContent content, Uri feedAlternateLink, string id,
+ public SyndicationItem (string title, SyndicationContent content, Uri itemAlternateLink, string id,
DateTimeOffset lastUpdatedTime)
{
Title = title != null ? new TextSyndicationContent (title) : null;
Content = content;
- if (feedAlternateLink != null)
- AddPermalink (feedAlternateLink);
+ if (itemAlternateLink != null)
+ AddPermalink (itemAlternateLink);
Id = id;
LastUpdatedTime = lastUpdatedTime;
}
set { title = value; }
}
- public void AddPermalink (Uri link)
+ public void AddPermalink (Uri permalink)
{
- if (link == null)
- throw new ArgumentNullException ("link");
- Links.Add (SyndicationLink.CreateAlternateLink (link));
+ if (permalink == null)
+ throw new ArgumentNullException ("permalink");
+ Links.Add (SyndicationLink.CreateAlternateLink (permalink));
}
public virtual SyndicationItem Clone ()
return extension.GetObject<TContent> ();
}
- public TContent ReadContent<TContent> (XmlObjectSerializer serializer)
+ public TContent ReadContent<TContent> (XmlObjectSerializer dataContractSerializer)
{
- return extension.GetObject<TContent> (serializer);
+ return extension.GetObject<TContent> (dataContractSerializer);
}
public TContent ReadContent<TContent> (XmlSerializer serializer)
}
#endif
- public WebChannelFactory(Type serviceType)
- : base (serviceType)
+ public WebChannelFactory(Type channelType)
+ : base (channelType)
{
}
- public WebChannelFactory (string configurationName)
- : base (configurationName)
+ public WebChannelFactory (string endpointConfigurationName)
+ : base (endpointConfigurationName)
{
}
OutgoingWebRequestContext outgoing_request;
OutgoingWebResponseContext outgoing_response;
- public WebOperationContext (OperationContext operation)
+ public WebOperationContext (OperationContext operationContext)
{
- if (operation == null)
- throw new ArgumentNullException ("operation");
+ if (operationContext == null)
+ throw new ArgumentNullException ("operationContext");
outgoing_request = new OutgoingWebRequestContext ();
- incoming_response = new IncomingWebResponseContext (operation);
+ incoming_response = new IncomingWebResponseContext (operationContext);
#if !MOBILE
- incoming_request = new IncomingWebRequestContext (operation);
+ incoming_request = new IncomingWebRequestContext (operationContext);
outgoing_response = new OutgoingWebResponseContext ();
#endif
}
}
#endif
- public void Attach (OperationContext context)
+ public void Attach (OperationContext owner)
{
// do nothing
}
- public void Detach (OperationContext context)
+ public void Detach (OperationContext owner)
{
// do nothing
}
{
}
- public WebHttpBinding (WebHttpSecurityMode mode)
+ public WebHttpBinding (WebHttpSecurityMode securityMode)
{
- Initialize (mode);
+ Initialize (securityMode);
}
public WebHttpBinding (string configurationName)
public class UriTemplateMatchException : SystemException
{
public UriTemplateMatchException () : base () {}
- public UriTemplateMatchException (string msg) : base (msg) {}
- public UriTemplateMatchException (string msg, Exception inner) : base (msg, inner) {}
+ public UriTemplateMatchException (string message) : base (message) {}
+ public UriTemplateMatchException (string message, Exception innerException) : base (message, innerException) {}
protected UriTemplateMatchException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
return list;
}
- protected override void InsertItem (int index, TItem kind)
+ protected override void InsertItem (int index, TItem item)
{
- base.InsertItem (index, kind);
+ base.InsertItem (index, item);
}
- protected override void SetItem (int index, TItem kind)
+ protected override void SetItem (int index, TItem item)
{
- base.SetItem (index, kind);
+ base.SetItem (index, item);
}
public T Remove<T> ()
}
protected SynchronizedKeyedCollection (object syncRoot,
- IEqualityComparer<K> comparer, int capacity)
+ IEqualityComparer<K> comparer, int dictionaryCreationThreshold)
: base (syncRoot)
{
- dict = new Dictionary<K, T> (capacity, comparer);
+ dict = new Dictionary<K, T> (dictionaryCreationThreshold, comparer);
}
// see bug #76417
{
}
- public SynchronizedReadOnlyCollection (object sync_root)
- : this (sync_root, new List<T> ())
+ public SynchronizedReadOnlyCollection (object syncRoot)
+ : this (syncRoot, new List<T> ())
{
}
- public SynchronizedReadOnlyCollection (object sync_root, IEnumerable<T> list)
+ public SynchronizedReadOnlyCollection (object syncRoot, IEnumerable<T> list)
{
- if (sync_root == null)
- throw new ArgumentNullException ("sync_root");
+ if (syncRoot == null)
+ throw new ArgumentNullException ("syncRoot");
if (list == null)
throw new ArgumentNullException ("list");
- this.sync_root = sync_root;
+ this.sync_root = syncRoot;
this.l = new List<T> (list);
}
- public SynchronizedReadOnlyCollection (object sync_root, params T [] list)
- : this (sync_root, (IEnumerable<T>) list)
+ public SynchronizedReadOnlyCollection (object syncRoot, params T [] list)
+ : this (syncRoot, (IEnumerable<T>) list)
{
}
public virtual IChannelListener<TChannel>
BuildChannelListener<TChannel> (
- Uri listenUri,
+ Uri listenUriBaseAddress,
params object [] parameters)
where TChannel : class, IChannel
{
new BindingParameterCollection ();
foreach (object o in parameters)
pl.Add (o);
- return BuildChannelListener<TChannel> (listenUri, pl);
+ return BuildChannelListener<TChannel> (listenUriBaseAddress, pl);
}
public virtual IChannelListener<TChannel>
BuildChannelListener<TChannel> (
- Uri listenUri,
+ Uri listenUriBaseAddress,
BindingParameterCollection parameters)
where TChannel : class, IChannel
{
- return BuildChannelListener<TChannel> (listenUri,
+ return BuildChannelListener<TChannel> (listenUriBaseAddress,
String.Empty, parameters);
}
}
public IAsyncResult BeginAcceptChannel (
- AsyncCallback callback, object asyncState)
+ AsyncCallback callback, object state)
{
return BeginAcceptChannel (
- timeouts.ReceiveTimeout, callback, asyncState);
+ timeouts.ReceiveTimeout, callback, state);
}
public IAsyncResult BeginAcceptChannel (TimeSpan timeout,
- AsyncCallback callback, object asyncState)
+ AsyncCallback callback, object state)
{
- return OnBeginAcceptChannel (timeout, callback, asyncState);
+ return OnBeginAcceptChannel (timeout, callback, state);
}
public TChannel EndAcceptChannel (IAsyncResult result)
protected abstract TChannel OnAcceptChannel (TimeSpan timeout);
protected abstract IAsyncResult OnBeginAcceptChannel (TimeSpan timeout,
- AsyncCallback callback, object asyncState);
+ AsyncCallback callback, object state);
protected abstract TChannel OnEndAcceptChannel (IAsyncResult result);
}
ISecurityCapabilities security;
string scheme = "";
- public CustomBinding (string name)
- : this (name, default_ns)
+ public CustomBinding (string configurationName)
+ : this (configurationName, default_ns)
{
}
// 1)
public static Message CreateMessage (MessageVersion version,
- FaultCode code, string reason, string action)
+ FaultCode faultCode, string reason, string action)
{
- MessageFault fault = MessageFault.CreateFault (code, reason);
+ MessageFault fault = MessageFault.CreateFault (faultCode, reason);
return CreateMessage (version, fault, action);
}
// 2)
public static Message CreateMessage (MessageVersion version,
- FaultCode code, string reason, object detail,
+ FaultCode faultCode, string reason, object detail,
string action)
{
MessageFault fault = MessageFault.CreateFault (
- code, new FaultReason (reason), detail);
+ faultCode, new FaultReason (reason), detail);
return CreateMessage (version, fault, action);
}
return CreateNavigator (XmlSpace.Default);
}
- public XPathNavigator CreateNavigator (int node_quota)
+ public XPathNavigator CreateNavigator (int nodeQuota)
{
- return CreateNavigator (node_quota, XmlSpace.Default);
+ return CreateNavigator (nodeQuota, XmlSpace.Default);
}
[MonoTODO ("supply proper quota")]
}
[MonoTODO ("Handle node_quota and xmlspace")]
- public XPathNavigator CreateNavigator (int node_quota, XmlSpace space)
+ public XPathNavigator CreateNavigator (int nodeQuota, XmlSpace space)
{
if (nav_cache == null) {
- DTMXPathDocumentWriter2 pw = new DTMXPathDocumentWriter2 (new NameTable (), node_quota);
+ DTMXPathDocumentWriter2 pw = new DTMXPathDocumentWriter2 (new NameTable (), nodeQuota);
XmlDictionaryWriter w = XmlDictionaryWriter.CreateDictionaryWriter (pw);
CreateMessage ().WriteMessage (w);
nav_cache = pw.CreateDocument ().CreateNavigator ();
public static MessageFault CreateFault (FaultCode code,
FaultReason reason, object detail,
- XmlObjectSerializer formatter)
+ XmlObjectSerializer serializer)
{
return new SimpleMessageFault (code, reason, true,
- detail, formatter, String.Empty, String.Empty);
+ detail, serializer, String.Empty, String.Empty);
}
public static MessageFault CreateFault (FaultCode code,
FaultReason reason, object detail,
- XmlObjectSerializer formatter, string actor)
+ XmlObjectSerializer serializer, string actor)
{
return new SimpleMessageFault (code, reason,
- true, detail, formatter, actor, String.Empty);
+ true, detail, serializer, actor, String.Empty);
}
public static MessageFault CreateFault (FaultCode code,
FaultReason reason, object detail,
- XmlObjectSerializer formatter, string actor, string node)
+ XmlObjectSerializer serializer, string actor, string node)
{
return new SimpleMessageFault (code, reason,
- true, detail, formatter, actor, node);
+ true, detail, serializer, actor, node);
}
// pretty simple implementation class
new Dictionary<Type, XmlObjectSerializer> ();
MessageVersion version;
- public MessageHeaders (MessageHeaders headers)
- : this (headers.MessageVersion)
+ public MessageHeaders (MessageHeaders collection)
+ : this (collection.MessageVersion)
{
- CopyHeadersFrom (headers);
+ CopyHeadersFrom (collection);
}
public MessageHeaders (MessageVersion version)
{
}
- public MessageHeaders (MessageVersion version, int capacity)
+ public MessageHeaders (MessageVersion version, int initialSize)
{
this.version = version;
- l = new List<MessageHeaderInfo> (capacity);
+ l = new List<MessageHeaderInfo> (initialSize);
}
public void Add (MessageHeader header)
}
public MtomMessageEncodingBindingElement (
- MessageVersion version, Encoding encoding)
+ MessageVersion messageVersion, Encoding writeEncoding)
{
- this.version = version;
- this.encoding = encoding;
+ this.version = messageVersion;
+ this.encoding = writeEncoding;
}
public int MaxBufferSize {
}
protected NamedPipeTransportBindingElement (
- NamedPipeTransportBindingElement other)
- : base (other)
+ NamedPipeTransportBindingElement elementToBeCloned)
+ : base (elementToBeCloned)
{
- pool.CopyPropertiesFrom (other.pool);
+ pool.CopyPropertiesFrom (elementToBeCloned.pool);
}
NamedPipeConnectionPoolSettings pool = new NamedPipeConnectionPoolSettings ();
{
}
- protected StreamUpgradeBindingElement (StreamUpgradeBindingElement other)
+ protected StreamUpgradeBindingElement (StreamUpgradeBindingElement elementToBeCloned)
{
}
{
}
- public TransactionFlowBindingElement (TransactionProtocol protocol)
+ public TransactionFlowBindingElement (TransactionProtocol transactionProtocol)
{
- this.protocol = protocol;
+ this.protocol = transactionProtocol;
}
public TransactionProtocol TransactionProtocol {
{
headers = new List<MessageHeaderInfo> ();
}
- public void Add (MessageHeaderInfo header)
+ public void Add (MessageHeaderInfo headerInfo)
{
- headers.Add (header);
+ headers.Add (headerInfo);
}
- public bool Contains (MessageHeaderInfo header)
+ public bool Contains (MessageHeaderInfo headerInfo)
{
- return headers.Contains (header);
+ return headers.Contains (headerInfo);
}
public IEnumerator<MessageHeaderInfo> GetEnumerator ()
return headers.GetEnumerator ();
}
- public void Remove (MessageHeaderInfo header)
+ public void Remove (MessageHeaderInfo headerInfo)
{
- headers.Remove (header);
+ headers.Remove (headerInfo);
}
IEnumerator IEnumerable.GetEnumerator ()
return new BinaryMessageEncodingBindingElement ();
}
- public override void ApplyConfiguration (BindingElement element)
+ public override void ApplyConfiguration (BindingElement bindingElement)
{
- var b = (BinaryMessageEncodingBindingElement) element;
+ var b = (BinaryMessageEncodingBindingElement) bindingElement;
b.MaxReadPoolSize = MaxReadPoolSize;
b.MaxSessionSize = MaxSessionSize;
b.MaxWritePoolSize = MaxWritePoolSize;
ReaderQuotas.ApplyConfiguration (b.ReaderQuotas);
}
- public override void CopyFrom (ServiceModelExtensionElement element)
+ public override void CopyFrom (ServiceModelExtensionElement from)
{
- var b = (BinaryMessageEncodingElement) element;
+ var b = (BinaryMessageEncodingElement) from;
MaxReadPoolSize = b.MaxReadPoolSize;
MaxSessionSize = b.MaxSessionSize;
MaxWritePoolSize = b.MaxWritePoolSize;
ReaderQuotas.CopyFrom (b.ReaderQuotas);
}
- protected internal override void InitializeFrom (BindingElement element)
+ protected internal override void InitializeFrom (BindingElement bindingElement)
{
- var b = (BinaryMessageEncodingBindingElement) element;
+ var b = (BinaryMessageEncodingBindingElement) bindingElement;
MaxReadPoolSize = b.MaxReadPoolSize;
MaxSessionSize = b.MaxSessionSize;
MaxWritePoolSize = b.MaxWritePoolSize;
return sm.Bindings;
}
- public new BindingCollectionElement this [string name] {
+ public new BindingCollectionElement this [string binding] {
get {
- object element = base [name];
+ object element = base [binding];
if (element is BindingCollectionElement)
return (BindingCollectionElement) element;
- throw new NotImplementedException (String.Format ("Could not find {0}", name));
+ throw new NotImplementedException (String.Format ("Could not find {0}", binding));
}
}
return cb;
}
- protected internal void ApplyConfiguration (ClientCredentials cb)
+ protected internal void ApplyConfiguration (ClientCredentials behavior)
{
- cb.SupportInteractive = SupportInteractive;
+ behavior.SupportInteractive = SupportInteractive;
// how is "Type" used?
// ClientCertificate
if (!String.IsNullOrEmpty (ClientCertificate.FindValue))
- cb.ClientCertificate.SetCertificate (ClientCertificate.StoreLocation, ClientCertificate.StoreName, ClientCertificate.X509FindType, ClientCertificate.FindValue);
+ behavior.ClientCertificate.SetCertificate (ClientCertificate.StoreLocation, ClientCertificate.StoreName, ClientCertificate.X509FindType, ClientCertificate.FindValue);
// HttpDigest
if (HttpDigest.ImpersonationLevel != TokenImpersonationLevel.None)
throw new NotImplementedException ();
// IssuedToken
- var bi = cb.IssuedToken;
+ var bi = behavior.IssuedToken;
var ci = IssuedToken;
bi.CacheIssuedTokens = ci.CacheIssuedTokens;
bi.DefaultKeyEntropyMode = ci.DefaultKeyEntropyMode;
// Peer
if (!String.IsNullOrEmpty (Peer.Certificate.FindValue))
- cb.Peer.SetCertificate (Peer.Certificate.StoreLocation, Peer.Certificate.StoreName, Peer.Certificate.X509FindType, Peer.Certificate.FindValue);
+ behavior.Peer.SetCertificate (Peer.Certificate.StoreLocation, Peer.Certificate.StoreName, Peer.Certificate.X509FindType, Peer.Certificate.FindValue);
// cb.Peer.MeshPassword = /* cannot fill it here */
- cb.Peer.MessageSenderAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.MessageSenderAuthentication.CustomCertificateValidatorType);
- cb.Peer.MessageSenderAuthentication.CertificateValidationMode = Peer.MessageSenderAuthentication.CertificateValidationMode;
- cb.Peer.MessageSenderAuthentication.RevocationMode = Peer.MessageSenderAuthentication.RevocationMode;
- cb.Peer.MessageSenderAuthentication.TrustedStoreLocation = Peer.MessageSenderAuthentication.TrustedStoreLocation;
- cb.Peer.PeerAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.PeerAuthentication.CustomCertificateValidatorType);
- cb.Peer.PeerAuthentication.CertificateValidationMode = Peer.PeerAuthentication.CertificateValidationMode;
- cb.Peer.PeerAuthentication.RevocationMode = Peer.PeerAuthentication.RevocationMode;
- cb.Peer.PeerAuthentication.TrustedStoreLocation = Peer.PeerAuthentication.TrustedStoreLocation;
+ behavior.Peer.MessageSenderAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.MessageSenderAuthentication.CustomCertificateValidatorType);
+ behavior.Peer.MessageSenderAuthentication.CertificateValidationMode = Peer.MessageSenderAuthentication.CertificateValidationMode;
+ behavior.Peer.MessageSenderAuthentication.RevocationMode = Peer.MessageSenderAuthentication.RevocationMode;
+ behavior.Peer.MessageSenderAuthentication.TrustedStoreLocation = Peer.MessageSenderAuthentication.TrustedStoreLocation;
+ behavior.Peer.PeerAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.PeerAuthentication.CustomCertificateValidatorType);
+ behavior.Peer.PeerAuthentication.CertificateValidationMode = Peer.PeerAuthentication.CertificateValidationMode;
+ behavior.Peer.PeerAuthentication.RevocationMode = Peer.PeerAuthentication.RevocationMode;
+ behavior.Peer.PeerAuthentication.TrustedStoreLocation = Peer.PeerAuthentication.TrustedStoreLocation;
// ServiceCertificate
- var bsc = cb.ServiceCertificate;
+ var bsc = behavior.ServiceCertificate;
var csc = ServiceCertificate;
var bsca = bsc.Authentication;
var csca = csc.Authentication;
// cb.UserNamePassword : not configurable ...
// Windows
- cb.Windows.AllowedImpersonationLevel = Windows.AllowedImpersonationLevel;
- cb.Windows.AllowNtlm = Windows.AllowNtlm;
+ behavior.Windows.AllowedImpersonationLevel = Windows.AllowedImpersonationLevel;
+ behavior.Windows.AllowNtlm = Windows.AllowNtlm;
}
object CreateInstance (string typeName)
return new ReliableSessionBindingElement ();
}
- public override void ApplyConfiguration (BindingElement element)
+ public override void ApplyConfiguration (BindingElement bindingElement)
{
- var b = (ReliableSessionBindingElement) element;
+ var b = (ReliableSessionBindingElement) bindingElement;
b.AcknowledgementInterval = AcknowledgementInterval;
b.FlowControlEnabled = FlowControlEnabled;
b.InactivityTimeout = InactivityTimeout;
b.ReliableMessagingVersion = ReliableMessagingVersion;
}
- public override void CopyFrom (ServiceModelExtensionElement element)
+ public override void CopyFrom (ServiceModelExtensionElement from)
{
- var b = (ReliableSessionElement) element;
+ var b = (ReliableSessionElement) from;
AcknowledgementInterval = b.AcknowledgementInterval;
FlowControlEnabled = b.FlowControlEnabled;
InactivityTimeout = b.InactivityTimeout;
ReliableMessagingVersion = b.ReliableMessagingVersion;
}
- protected internal override void InitializeFrom (BindingElement element)
+ protected internal override void InitializeFrom (BindingElement bindingElement)
{
- var b = (ReliableSessionBindingElement) element;
+ var b = (ReliableSessionBindingElement) bindingElement;
AcknowledgementInterval = b.AcknowledgementInterval;
FlowControlEnabled = b.FlowControlEnabled;
InactivityTimeout = b.InactivityTimeout;
return sb;
}
- protected internal void ApplyConfiguration (ServiceCredentials sb)
+ protected internal void ApplyConfiguration (ServiceCredentials behavior)
{
// IssuedToken
foreach (AllowedAudienceUriElement ae in IssuedTokenAuthentication.AllowedAudienceUris)
- sb.IssuedTokenAuthentication.AllowedAudienceUris.Add (ae.AllowedAudienceUri);
- sb.IssuedTokenAuthentication.AllowUntrustedRsaIssuers = IssuedTokenAuthentication.AllowUntrustedRsaIssuers;
- sb.IssuedTokenAuthentication.AudienceUriMode = IssuedTokenAuthentication.AudienceUriMode;
+ behavior.IssuedTokenAuthentication.AllowedAudienceUris.Add (ae.AllowedAudienceUri);
+ behavior.IssuedTokenAuthentication.AllowUntrustedRsaIssuers = IssuedTokenAuthentication.AllowUntrustedRsaIssuers;
+ behavior.IssuedTokenAuthentication.AudienceUriMode = IssuedTokenAuthentication.AudienceUriMode;
if (!String.IsNullOrEmpty (IssuedTokenAuthentication.CustomCertificateValidatorType))
- sb.IssuedTokenAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (IssuedTokenAuthentication.CustomCertificateValidatorType);
- sb.IssuedTokenAuthentication.CertificateValidationMode = IssuedTokenAuthentication.CertificateValidationMode;
- sb.IssuedTokenAuthentication.RevocationMode = IssuedTokenAuthentication.RevocationMode;
- sb.IssuedTokenAuthentication.TrustedStoreLocation = IssuedTokenAuthentication.TrustedStoreLocation;
+ behavior.IssuedTokenAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (IssuedTokenAuthentication.CustomCertificateValidatorType);
+ behavior.IssuedTokenAuthentication.CertificateValidationMode = IssuedTokenAuthentication.CertificateValidationMode;
+ behavior.IssuedTokenAuthentication.RevocationMode = IssuedTokenAuthentication.RevocationMode;
+ behavior.IssuedTokenAuthentication.TrustedStoreLocation = IssuedTokenAuthentication.TrustedStoreLocation;
foreach (X509CertificateTrustedIssuerElement ce in IssuedTokenAuthentication.KnownCertificates)
- sb.IssuedTokenAuthentication.KnownCertificates.Add (GetCertificate (ce.StoreLocation, ce.StoreName, ce.X509FindType, ce.FindValue));
+ behavior.IssuedTokenAuthentication.KnownCertificates.Add (GetCertificate (ce.StoreLocation, ce.StoreName, ce.X509FindType, ce.FindValue));
- sb.IssuedTokenAuthentication.SamlSerializer = (SamlSerializer) CreateInstance (IssuedTokenAuthentication.SamlSerializerType);
+ behavior.IssuedTokenAuthentication.SamlSerializer = (SamlSerializer) CreateInstance (IssuedTokenAuthentication.SamlSerializerType);
// Peer
if (!String.IsNullOrEmpty (Peer.Certificate.FindValue))
- sb.Peer.SetCertificate (Peer.Certificate.StoreLocation, Peer.Certificate.StoreName, Peer.Certificate.X509FindType, Peer.Certificate.FindValue);
+ behavior.Peer.SetCertificate (Peer.Certificate.StoreLocation, Peer.Certificate.StoreName, Peer.Certificate.X509FindType, Peer.Certificate.FindValue);
// sb.Peer.MeshPassword = /* cannot fill it here */
- sb.Peer.MessageSenderAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.MessageSenderAuthentication.CustomCertificateValidatorType);
- sb.Peer.MessageSenderAuthentication.CertificateValidationMode = Peer.MessageSenderAuthentication.CertificateValidationMode;
- sb.Peer.MessageSenderAuthentication.RevocationMode = Peer.MessageSenderAuthentication.RevocationMode;
- sb.Peer.MessageSenderAuthentication.TrustedStoreLocation = Peer.MessageSenderAuthentication.TrustedStoreLocation;
- sb.Peer.PeerAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.PeerAuthentication.CustomCertificateValidatorType);
- sb.Peer.PeerAuthentication.CertificateValidationMode = Peer.PeerAuthentication.CertificateValidationMode;
- sb.Peer.PeerAuthentication.RevocationMode = Peer.PeerAuthentication.RevocationMode;
- sb.Peer.PeerAuthentication.TrustedStoreLocation = Peer.PeerAuthentication.TrustedStoreLocation;
+ behavior.Peer.MessageSenderAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.MessageSenderAuthentication.CustomCertificateValidatorType);
+ behavior.Peer.MessageSenderAuthentication.CertificateValidationMode = Peer.MessageSenderAuthentication.CertificateValidationMode;
+ behavior.Peer.MessageSenderAuthentication.RevocationMode = Peer.MessageSenderAuthentication.RevocationMode;
+ behavior.Peer.MessageSenderAuthentication.TrustedStoreLocation = Peer.MessageSenderAuthentication.TrustedStoreLocation;
+ behavior.Peer.PeerAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.PeerAuthentication.CustomCertificateValidatorType);
+ behavior.Peer.PeerAuthentication.CertificateValidationMode = Peer.PeerAuthentication.CertificateValidationMode;
+ behavior.Peer.PeerAuthentication.RevocationMode = Peer.PeerAuthentication.RevocationMode;
+ behavior.Peer.PeerAuthentication.TrustedStoreLocation = Peer.PeerAuthentication.TrustedStoreLocation;
// WSSC
- sb.SecureConversationAuthentication.SecurityStateEncoder = (SecurityStateEncoder) CreateInstance (SecureConversationAuthentication.SecurityStateEncoderType);
+ behavior.SecureConversationAuthentication.SecurityStateEncoder = (SecurityStateEncoder) CreateInstance (SecureConversationAuthentication.SecurityStateEncoderType);
// X509
if (!String.IsNullOrEmpty (ServiceCertificate.FindValue))
- sb.ServiceCertificate.SetCertificate (ServiceCertificate.StoreLocation, ServiceCertificate.StoreName, ServiceCertificate.X509FindType, ServiceCertificate.FindValue);
+ behavior.ServiceCertificate.SetCertificate (ServiceCertificate.StoreLocation, ServiceCertificate.StoreName, ServiceCertificate.X509FindType, ServiceCertificate.FindValue);
// UserNamePassword
- sb.UserNameAuthentication.CachedLogonTokenLifetime = UserNameAuthentication.CachedLogonTokenLifetime;
- sb.UserNameAuthentication.CacheLogonTokens = UserNameAuthentication.CacheLogonTokens;
- sb.UserNameAuthentication.CustomUserNamePasswordValidator = (UserNamePasswordValidator) CreateInstance (UserNameAuthentication.CustomUserNamePasswordValidatorType);
- sb.UserNameAuthentication.IncludeWindowsGroups = UserNameAuthentication.IncludeWindowsGroups;
- sb.UserNameAuthentication.MaxCachedLogonTokens = UserNameAuthentication.MaxCachedLogonTokens;
- sb.UserNameAuthentication.MembershipProvider = (MembershipProvider) CreateInstance (UserNameAuthentication.MembershipProviderName);
- sb.UserNameAuthentication.UserNamePasswordValidationMode = UserNameAuthentication.UserNamePasswordValidationMode;
+ behavior.UserNameAuthentication.CachedLogonTokenLifetime = UserNameAuthentication.CachedLogonTokenLifetime;
+ behavior.UserNameAuthentication.CacheLogonTokens = UserNameAuthentication.CacheLogonTokens;
+ behavior.UserNameAuthentication.CustomUserNamePasswordValidator = (UserNamePasswordValidator) CreateInstance (UserNameAuthentication.CustomUserNamePasswordValidatorType);
+ behavior.UserNameAuthentication.IncludeWindowsGroups = UserNameAuthentication.IncludeWindowsGroups;
+ behavior.UserNameAuthentication.MaxCachedLogonTokens = UserNameAuthentication.MaxCachedLogonTokens;
+ behavior.UserNameAuthentication.MembershipProvider = (MembershipProvider) CreateInstance (UserNameAuthentication.MembershipProviderName);
+ behavior.UserNameAuthentication.UserNamePasswordValidationMode = UserNameAuthentication.UserNamePasswordValidationMode;
// Windows
- sb.WindowsAuthentication.AllowAnonymousLogons = WindowsAuthentication.AllowAnonymousLogons;
- sb.WindowsAuthentication.IncludeWindowsGroups = WindowsAuthentication.IncludeWindowsGroups;
+ behavior.WindowsAuthentication.AllowAnonymousLogons = WindowsAuthentication.AllowAnonymousLogons;
+ behavior.WindowsAuthentication.IncludeWindowsGroups = WindowsAuthentication.IncludeWindowsGroups;
}
X509Certificate2 GetCertificate (StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue)
return (ConfigurationElement) Activator.CreateInstance (typeof (ConfigurationElementType), new object [0]);
}
- public void CopyTo (ConfigurationElementType [] array, int index)
+ public void CopyTo (ConfigurationElementType [] array, int start)
{
- base.CopyTo (array, index);
+ base.CopyTo (array, start);
}
- public int IndexOf (ConfigurationElementType item)
+ public int IndexOf (ConfigurationElementType element)
{
- return BaseIndexOf (item);
+ return BaseIndexOf (element);
}
- public void Remove (ConfigurationElementType item)
+ public void Remove (ConfigurationElementType element)
{
- BaseRemove (GetElementKey (item));
+ BaseRemove (GetElementKey (element));
}
public void RemoveAt (int index)
BaseRemoveAt (index);
}
- public void RemoveAt (object index)
+ public void RemoveAt (object key)
{
- BaseRemove (index);
+ BaseRemove (key);
}
}
}
// Methods
- public void ApplyConfiguration (OptionalReliableSession s)
+ public void ApplyConfiguration (OptionalReliableSession optionalReliableSession)
{
- base.ApplyConfiguration (s);
- s.Enabled = this.Enabled;
+ base.ApplyConfiguration (optionalReliableSession);
+ optionalReliableSession.Enabled = this.Enabled;
}
}
// Methods
- public void ApplyConfiguration (ReliableSession s)
+ public void ApplyConfiguration (ReliableSession reliableSession)
{
- s.InactivityTimeout = InactivityTimeout;
- s.Ordered = Ordered;
+ reliableSession.InactivityTimeout = InactivityTimeout;
+ reliableSession.Ordered = Ordered;
}
}
protected abstract void OnApplyConfiguration (ServiceEndpoint endpoint, ChannelEndpointElement channelEndpointElement);
- protected abstract void OnApplyConfiguration (ServiceEndpoint endpoint, ServiceEndpointElement channelEndpointElement);
+ protected abstract void OnApplyConfiguration (ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement);
protected abstract void OnInitializeAndValidate (ChannelEndpointElement channelEndpointElement);
- protected abstract void OnInitializeAndValidate (ServiceEndpointElement channelEndpointElement);
+ protected abstract void OnInitializeAndValidate (ServiceEndpointElement serviceEndpointElement);
protected override void Reset (ConfigurationElement parentElement)
{
return sm.StandardEndpoints;
}
- public new EndpointCollectionElement this [string name] {
+ public new EndpointCollectionElement this [string endpoint] {
get {
- object element = base [name];
+ object element = base [endpoint];
if (element is EndpointCollectionElement)
return (EndpointCollectionElement) element;
- throw new ArgumentException (String.Format ("Could not find {0}", name));
+ throw new ArgumentException (String.Format ("Could not find {0}", endpoint));
}
}
}
- public override void ApplyConfiguration (BindingElement element)
+ public override void ApplyConfiguration (BindingElement bindingElement)
{
- var b = (TextMessageEncodingBindingElement) element;
+ var b = (TextMessageEncodingBindingElement) bindingElement;
b.MaxReadPoolSize = MaxReadPoolSize;
b.MaxWritePoolSize = MaxWritePoolSize;
b.MessageVersion = MessageVersion;
ReaderQuotas.ApplyConfiguration (b.ReaderQuotas);
}
- public override void CopyFrom (ServiceModelExtensionElement element)
+ public override void CopyFrom (ServiceModelExtensionElement from)
{
- var b = (TextMessageEncodingElement) element;
+ var b = (TextMessageEncodingElement) from;
MaxReadPoolSize = b.MaxReadPoolSize;
MaxWritePoolSize = b.MaxWritePoolSize;
MessageVersion = b.MessageVersion;
ReaderQuotas.CopyFrom (b.ReaderQuotas);
}
- protected internal override void InitializeFrom (BindingElement element)
+ protected internal override void InitializeFrom (BindingElement bindingElement)
{
- var b = (TextMessageEncodingBindingElement) element;
+ var b = (TextMessageEncodingBindingElement) bindingElement;
MaxReadPoolSize = b.MaxReadPoolSize;
MaxWritePoolSize = b.MaxWritePoolSize;
MessageVersion = b.MessageVersion;
{
}
- public FaultDescription Find (string name)
+ public FaultDescription Find (string action)
{
foreach (FaultDescription d in this)
- if (d.Name == name)
+ if (d.Name == action)
return d;
return null;
}
- public Collection<FaultDescription> FindAll (string name)
+ public Collection<FaultDescription> FindAll (string action)
{
Collection<FaultDescription> ret =
new Collection<FaultDescription> ();
foreach (FaultDescription d in this)
- if (d.Name == name)
+ if (d.Name == action)
ret.Add (d);
return ret;
}
public interface IServiceBehavior
{
void AddBindingParameters (
- ServiceDescription description,
+ ServiceDescription serviceDescription,
ServiceHostBase serviceHostBase,
Collection<ServiceEndpoint> endpoints,
- BindingParameterCollection parameters);
+ BindingParameterCollection bindingParameters);
void ApplyDispatchBehavior (
- ServiceDescription description,
+ ServiceDescription serviceDescription,
ServiceHostBase serviceHostBase);
void Validate (
- ServiceDescription description,
+ ServiceDescription serviceDescription,
ServiceHostBase serviceHostBase);
}
}
XmlSchemaSet xmlSchemas, ICollection<XmlElement> policy);
void ImportContract (WsdlImporter importer,
- WsdlContractConversionContext contractContext);
+ WsdlContractConversionContext context);
void ImportEndpoint (WsdlImporter importer,
- WsdlEndpointConversionContext endpointContext);
+ WsdlEndpointConversionContext context);
}
}
get { return msg; }
}
- public override bool Equals (object other)
+ public override bool Equals (object obj)
{
- MetadataConversionError e = other as MetadataConversionError;
+ MetadataConversionError e = obj as MetadataConversionError;
return e != null &&
e.warning == warning &&
e.msg == msg;
ServiceContractGenerationContext contract,
OperationDescription operation,
CodeTypeDeclaration declaringType,
- CodeMemberMethod method,
+ CodeMemberMethod syncMethod,
CodeMemberMethod beginMethod,
CodeMemberMethod endMethod)
{
this.contract = contract;
this.operation = operation;
declaring_type = declaringType;
- this.method = method;
+ this.method = syncMethod;
this.begin_method = beginMethod;
this.end_method = endMethod;
}
{
}
- public PolicyAssertionCollection (IEnumerable<XmlElement> list)
- : base (new List<XmlElement> (list))
+ public PolicyAssertionCollection (IEnumerable<XmlElement> elements)
+ : base (new List<XmlElement> (elements))
{
}
[MonoTODO]
- public bool Contains (string name, string ns)
+ public bool Contains (string localName, string namespaceUri)
{
foreach (XmlElement el in this)
- if (el.LocalName == name && el.NamespaceURI == ns)
+ if (el.LocalName == localName && el.NamespaceURI == namespaceUri)
return true;
return false;
}
[MonoTODO]
- public XmlElement Find (string name, string ns)
+ public XmlElement Find (string localName, string namespaceUri)
{
foreach (XmlElement el in this)
- if (el.LocalName == name && el.NamespaceURI == ns)
+ if (el.LocalName == localName && el.NamespaceURI == namespaceUri)
return el;
return null;
}
[MonoTODO]
- public Collection<XmlElement> FindAll (string name, string ns)
+ public Collection<XmlElement> FindAll (string localName, string namespaceUri)
{
Collection<XmlElement> ret =
new Collection<XmlElement> ();
foreach (XmlElement el in this)
- if (el.LocalName == name && el.NamespaceURI == ns)
+ if (el.LocalName == localName && el.NamespaceURI == namespaceUri)
ret.Add (el);
return ret;
}
[MonoTODO]
- public XmlElement Remove (string name, string ns)
+ public XmlElement Remove (string localName, string namespaceUri)
{
foreach (XmlElement el in this)
- if (el.LocalName == name && el.NamespaceURI == ns) {
+ if (el.LocalName == localName && el.NamespaceURI == namespaceUri) {
Remove (el);
return el;
}
}
[MonoTODO]
- public Collection<XmlElement> RemoveAll (string name, string ns)
+ public Collection<XmlElement> RemoveAll (string localName, string namespaceUri)
{
- Collection<XmlElement> list = FindAll (name, ns);
+ Collection<XmlElement> list = FindAll (localName, namespaceUri);
foreach (XmlElement el in list)
Remove (el);
return list;
{
}
- public ServiceContractGenerator (CodeCompileUnit ccu)
- : this (ccu, null)
+ public ServiceContractGenerator (CodeCompileUnit targetCompileUnit)
+ : this (targetCompileUnit, null)
{
}
- public ServiceContractGenerator (ConfigurationType config)
- : this (null, config)
+ public ServiceContractGenerator (ConfigurationType targetConfig)
+ : this (null, targetConfig)
{
}
- public ServiceContractGenerator (CodeCompileUnit ccu, ConfigurationType config)
+ public ServiceContractGenerator (CodeCompileUnit targetCompileUnit, ConfigurationType targetConfig)
{
- if (ccu == null)
+ if (targetCompileUnit == null)
this.ccu = new CodeCompileUnit ();
else
- this.ccu = ccu;
- this.config = config;
+ this.ccu = targetCompileUnit;
+ this.config = targetConfig;
Options |= ServiceContractGenerationOptions.ChannelInterface |
ServiceContractGenerationOptions.ClientClass;
}
set { service_type = value; }
}
- public static ServiceDescription GetService (Type type)
+ public static ServiceDescription GetService (Type serviceType)
{
// null Type is not rejected
ServiceDescription sd = new ServiceDescription ();
- sd.ServiceType = type;
- if (type != null) {
- var att = type.GetCustomAttribute<ServiceBehaviorAttribute> (true);
+ sd.ServiceType = serviceType;
+ if (serviceType != null) {
+ var att = serviceType.GetCustomAttribute<ServiceBehaviorAttribute> (true);
if (att != null) {
sd.Name = att.Name;
sd.Namespace = att.Namespace;
}
if (sd.Name == null)
- sd.Name = type.Name;
+ sd.Name = serviceType.Name;
if (sd.Namespace == null)
sd.Namespace = "http://tempuri.org/";
}
return sd;
}
- public static ServiceDescription GetService (object wellKnown)
+ public static ServiceDescription GetService (object serviceImplementation)
{
// null instance is not rejected
ServiceDescription sd = new ServiceDescription ();
- sd.ServiceType = wellKnown != null ? wellKnown.GetType () : null;
+ sd.ServiceType = serviceImplementation != null ? serviceImplementation.GetType () : null;
return sd;
}
}
{
}
- public ServiceEndpoint Find (Type type)
+ public ServiceEndpoint Find (Type contractType)
{
foreach (ServiceEndpoint e in this)
- if (e.Contract.ContractType == type)
+ if (e.Contract.ContractType == contractType)
return e;
return null;
}
- public ServiceEndpoint Find (Uri uri)
+ public ServiceEndpoint Find (Uri address)
{
foreach (ServiceEndpoint e in this)
- if (e.Address.Uri == uri)
+ if (e.Address.Uri == address)
return e;
return null;
}
- public ServiceEndpoint Find (XmlQualifiedName name)
+ public ServiceEndpoint Find (XmlQualifiedName contractName)
{
foreach (ServiceEndpoint e in this)
- if (e.Contract.Name == name.Name &&
- e.Contract.Namespace == name.Namespace)
+ if (e.Contract.Name == contractName.Name &&
+ e.Contract.Namespace == contractName.Namespace)
return e;
return null;
}
return list;
}
- public Collection<ServiceEndpoint> FindAll (XmlQualifiedName name)
+ public Collection<ServiceEndpoint> FindAll (XmlQualifiedName contractName)
{
Collection<ServiceEndpoint> list =
new Collection<ServiceEndpoint> ();
foreach (ServiceEndpoint e in this)
- if (e.Contract.Name == name.Name &&
- e.Contract.Namespace == name.Namespace)
+ if (e.Contract.Name == contractName.Name &&
+ e.Contract.Namespace == contractName.Namespace)
list.Add (e);
return list;
}
}
public static TypedMessageConverter Create (
- Type type, string action)
+ Type messageContract, string action)
{
- return Create (type, action, TempUri);
+ return Create (messageContract, action, TempUri);
}
public static TypedMessageConverter Create (
- Type type, string action,
+ Type messageContract, string action,
string defaultNamespace)
{
- return Create (type, action, defaultNamespace, (DataContractFormatAttribute)null);
+ return Create (messageContract, action, defaultNamespace, (DataContractFormatAttribute)null);
}
public static TypedMessageConverter Create (
- Type type, string action,
+ Type messageContract, string action,
DataContractFormatAttribute formatterAttribute)
{
- return Create (type, action, TempUri, formatterAttribute);
+ return Create (messageContract, action, TempUri, formatterAttribute);
}
public static TypedMessageConverter Create (
- Type type,
+ Type messageContract,
string action, string defaultNamespace,
DataContractFormatAttribute formatterAttribute)
{
return new DefaultTypedMessageConverter (
new DataContractMessagesFormatter (
- MessageContractToMessagesDescription (type, defaultNamespace, action),
+ MessageContractToMessagesDescription (messageContract, defaultNamespace, action),
formatterAttribute));
}
public static TypedMessageConverter Create (
- Type type, string action,
+ Type messageContract, string action,
XmlSerializerFormatAttribute formatterAttribute)
{
- return Create (type, action, TempUri, formatterAttribute);
+ return Create (messageContract, action, TempUri, formatterAttribute);
}
public static TypedMessageConverter Create (
- Type type, string action, string defaultNamespace,
+ Type messageContract, string action, string defaultNamespace,
XmlSerializerFormatAttribute formatterAttribute)
{
return new DefaultTypedMessageConverter (
new XmlMessagesFormatter (
- MessageContractToMessagesDescription (type, defaultNamespace, action),
+ MessageContractToMessagesDescription (messageContract, defaultNamespace, action),
formatterAttribute));
}
}
public MessageDescription GetMessageDescription (
- MessageBinding message)
+ MessageBinding messageBinding)
{
throw new NotImplementedException ();
}
}
public OperationDescription GetOperationDescription (
- OperationBinding operation)
+ OperationBinding operationBinding)
{
throw new NotImplementedException ();
}
public void ExportEndpoints (
IEnumerable<ServiceEndpoint> endpoints,
- XmlQualifiedName name)
+ XmlQualifiedName wsdlServiceQName)
{
if (endpoints == null)
throw new ArgumentNullException ("endpoints");
- if (name == null)
- throw new ArgumentNullException ("name");
+ if (wsdlServiceQName == null)
+ throw new ArgumentNullException ("wsdlServiceQName");
foreach (ServiceEndpoint ep in endpoints) {
if (ep.Contract.Name == ServiceMetadataBehavior.MexContractName)
beforeImportCalled = true;
}
- public SMBinding ImportBinding (WSBinding binding)
+ public SMBinding ImportBinding (WSBinding wsdlBinding)
{
- return ImportBinding (binding, true).Binding;
+ return ImportBinding (wsdlBinding, true).Binding;
}
ServiceEndpoint ImportBinding (WSBinding binding, bool throwOnError)
}
}
- public ServiceEndpointCollection ImportEndpoints (WSBinding binding)
+ public ServiceEndpointCollection ImportEndpoints (WSBinding wsdlBinding)
{
var coll = new ServiceEndpointCollection ();
- ImportEndpoints (coll, binding);
+ ImportEndpoints (coll, wsdlBinding);
return coll;
}
- public ServiceEndpointCollection ImportEndpoints (PortType portType)
+ public ServiceEndpointCollection ImportEndpoints (PortType wsdlPortType)
{
var coll = new ServiceEndpointCollection ();
foreach (WSServiceDescription wsd in wsdl_documents) {
foreach (WS.Binding binding in wsd.Bindings) {
- if (!binding.Type.Name.Equals (portType.Name))
+ if (!binding.Type.Name.Equals (wsdlPortType.Name))
continue;
ImportEndpoints (coll, binding);
return coll;
}
- public ServiceEndpointCollection ImportEndpoints (Service service)
+ public ServiceEndpointCollection ImportEndpoints (Service wsdlService)
{
var coll = new ServiceEndpointCollection ();
- foreach (Port port in service.Ports) {
+ foreach (Port port in wsdlService.Ports) {
var sep = ImportEndpoint (port, false);
if (sep != null)
coll.Add (sep);
public XmlSerializerOperationBehavior (
OperationDescription operation,
- XmlSerializerFormatAttribute format)
+ XmlSerializerFormatAttribute attribute)
{
if (operation == null)
throw new ArgumentNullException ("operation");
- if (format == null)
- format = new XmlSerializerFormatAttribute ();
- this.format = format;
+ if (attribute == null)
+ attribute = new XmlSerializerFormatAttribute ();
+ this.format = attribute;
this.operation = operation;
}
return false;
}
- public override bool Match (MessageBuffer buffer)
+ public override bool Match (MessageBuffer messageBuffer)
{
bool retval;
- Message m = buffer.CreateMessage ();
+ Message m = messageBuffer.CreateMessage ();
retval = Match (m);
m.Close ();
set { transport_handler = value; }
}
- public abstract bool HandleException (Exception e);
+ public abstract bool HandleException (Exception exception);
}
}
\ No newline at end of file
Collection<MessageFilter> filters;
public FilterInvalidBodyAccessException () : base ("Not allowed to navigate to body.") {}
- public FilterInvalidBodyAccessException (string msg) : base (msg) {}
- public FilterInvalidBodyAccessException (string msg, Exception inner) : base (msg, inner) {}
+ public FilterInvalidBodyAccessException (string message) : base (message) {}
+ public FilterInvalidBodyAccessException (string message, Exception innerException) : base (message, innerException) {}
protected FilterInvalidBodyAccessException (SerializationInfo info, StreamingContext context)
: base (info, context) {}
- public FilterInvalidBodyAccessException (string msg, Collection<MessageFilter> filters)
- : base (msg)
+ public FilterInvalidBodyAccessException (string message, Collection<MessageFilter> filters)
+ : base (message)
{
this.filters = filters;
}
- public FilterInvalidBodyAccessException (string msg, Exception inner, Collection<MessageFilter> filters)
- : base (msg, inner)
+ public FilterInvalidBodyAccessException (string message, Exception innerException, Collection<MessageFilter> filters)
+ : base (message, innerException)
{
this.filters = filters;
}
public interface IDispatchMessageFormatter
{
void DeserializeRequest (Message message, object [] parameters);
- Message SerializeReply (MessageVersion version, object [] parameters, object result);
+ Message SerializeReply (MessageVersion messageVersion, object [] parameters, object result);
}
}
{
public interface IDispatchMessageInspector
{
- object AfterReceiveRequest (ref Message message,
- IClientChannel channel, InstanceContext context);
- void BeforeSendReply (ref Message message, object instance);
+ object AfterReceiveRequest (ref Message request,
+ IClientChannel channel, InstanceContext instanceContext);
+ void BeforeSendReply (ref Message reply, object correlationState);
}
}
{
public interface IDispatchOperationSelector
{
- string SelectOperation (ref Message msg);
+ string SelectOperation (ref Message message);
}
}
{
public interface IErrorHandler
{
- bool HandleError (Exception exception);
- void ProvideFault (Exception exception, MessageVersion version,
+ bool HandleError (Exception error);
+ void ProvideFault (Exception error, MessageVersion version,
ref Message fault);
}
}
{
public interface IInstanceContextInitializer
{
- void Initialize (InstanceContext context, Message message);
+ void Initialize (InstanceContext instanceContext, Message message);
}
}
{
public interface IInstanceProvider
{
- object GetInstance (InstanceContext context);
- object GetInstance (InstanceContext context, Message message);
- void ReleaseInstance (InstanceContext context, object instance);
+ object GetInstance (InstanceContext instanceContext);
+ object GetInstance (InstanceContext instanceContext, Message message);
+ void ReleaseInstance (InstanceContext instanceContext, object instance);
}
}
IEnumerable<KeyValuePair<MessageFilter,TFilterData>>,
IEnumerable
{
- bool GetMatchingFilter (Message message, out MessageFilter result);
- bool GetMatchingFilter (MessageBuffer buffer, out MessageFilter result);
+ bool GetMatchingFilter (Message message, out MessageFilter filter);
+ bool GetMatchingFilter (MessageBuffer messageBuffer, out MessageFilter filter);
bool GetMatchingFilters (Message message, ICollection<MessageFilter> results);
- bool GetMatchingFilters (MessageBuffer buffer, ICollection<MessageFilter> results);
+ bool GetMatchingFilters (MessageBuffer messageBuffer, ICollection<MessageFilter> results);
- bool GetMatchingValue (Message message, out TFilterData data);
- bool GetMatchingValue (MessageBuffer buffer, out TFilterData data);
+ bool GetMatchingValue (Message message, out TFilterData value);
+ bool GetMatchingValue (MessageBuffer messageBuffer, out TFilterData value);
bool GetMatchingValues (Message message, ICollection<TFilterData> results);
- bool GetMatchingValues (MessageBuffer buffer, ICollection<TFilterData> results);
+ bool GetMatchingValues (MessageBuffer messageBuffer, ICollection<TFilterData> results);
}
}
-//
+//
// InstanceContextIdleCallback.cs
//
// Author: Atsushi Enomoto (atsushi@ximian.com)
namespace System.ServiceModel.Dispatcher
{
- public delegate void InstanceContextIdleCallback (InstanceContext context);
+ public delegate void InstanceContextIdleCallback (InstanceContext instanceContext);
}
[Serializable]
public abstract class InvalidBodyAccessException : SystemException
{
- protected InvalidBodyAccessException (string msg) : base (msg) {}
- protected InvalidBodyAccessException (string msg, Exception inner) : base (msg, inner) {}
+ protected InvalidBodyAccessException (string message) : base (message) {}
+ protected InvalidBodyAccessException (string message, Exception innerException) : base (message, innerException) {}
protected InvalidBodyAccessException (SerializationInfo info, StreamingContext context)
: base (info, context) {}
}
return true;
}
- public override bool Match (MessageBuffer buffer)
+ public override bool Match (MessageBuffer messageBuffer)
{
// as documented
return true;
return false;
}
- public override bool Match (MessageBuffer buffer)
+ public override bool Match (MessageBuffer messageBuffer)
{
// as documented
return false;
Collection<MessageFilter> filters;
public MessageFilterException () : this ("MessageFilter node quota exceeded.") {}
- public MessageFilterException (string msg) : base (msg) {}
- public MessageFilterException (string msg, Exception inner) : base (msg, inner) {}
+ public MessageFilterException (string message) : base (message) {}
+ public MessageFilterException (string message, Exception innerException) : base (message, innerException) {}
protected MessageFilterException (SerializationInfo info, StreamingContext context)
: base (info, context) {}
- public MessageFilterException (string msg, Collection<MessageFilter> filters)
- : base (msg)
+ public MessageFilterException (string message, Collection<MessageFilter> filters)
+ : base (message)
{
this.filters = filters;
}
- public MessageFilterException (string msg, Exception inner, Collection<MessageFilter> filters)
- : base (msg, inner)
+ public MessageFilterException (string message, Exception innerException, Collection<MessageFilter> filters)
+ : base (message, innerException)
{
this.filters = filters;
}
public MessageFilterTable ()
: this (0) {} // 0 is the default
- public MessageFilterTable (int default_priority)
+ public MessageFilterTable (int defaultPriority)
{
- this.default_priority = default_priority;
+ this.default_priority = defaultPriority;
table = new Dictionary<MessageFilter, TFilterData> ();
priority_list = new Dictionary<MessageFilter, int> ();
}
return table.ContainsKey (filter);
}
- public void CopyTo (KeyValuePair<MessageFilter, TFilterData> [] array, int index)
+ public void CopyTo (KeyValuePair<MessageFilter, TFilterData> [] array, int arrayIndex)
{
- ((ICollection) table).CopyTo (array, index);
+ ((ICollection) table).CopyTo (array, arrayIndex);
}
protected virtual IMessageFilterTable<TFilterData> CreateFilterTable (MessageFilter filter)
return priority_list [filter];
}
- public bool GetMatchingFilter (Message message, out MessageFilter result)
+ public bool GetMatchingFilter (Message message, out MessageFilter filter)
{
if (message == null)
throw new ArgumentNullException ("message is null");
- result = null;
+ filter = null;
int count = 0;
foreach (MessageFilter f in table.Keys) {
"More than one filter matches.");
count++;
- result = f;
+ filter = f;
}
return count == 1;
}
- public bool GetMatchingFilter (MessageBuffer buffer, out MessageFilter result)
+ public bool GetMatchingFilter (MessageBuffer buffer, out MessageFilter filter)
{
- return GetMatchingFilter (buffer.CreateMessage (), out result);
+ return GetMatchingFilter (buffer.CreateMessage (), out filter);
}
[MonoTODO ("Consider priority")]
Collection<MessageFilter> filters;
public MultipleFilterMatchesException () : base () {}
- public MultipleFilterMatchesException (string msg) : base (msg) {}
- public MultipleFilterMatchesException (string msg, Exception inner) : base (msg, inner) {}
+ public MultipleFilterMatchesException (string message) : base (message) {}
+ public MultipleFilterMatchesException (string message, Exception innerException) : base (message, innerException) {}
protected MultipleFilterMatchesException (SerializationInfo info, StreamingContext context)
: base (info, context) {}
- public MultipleFilterMatchesException (string msg, Collection<MessageFilter> filters)
- : base (msg)
+ public MultipleFilterMatchesException (string message, Collection<MessageFilter> filters)
+ : base (message)
{
this.filters = filters;
}
- public MultipleFilterMatchesException (string msg, Exception inner, Collection<MessageFilter> filters)
- : base (msg, inner)
+ public MultipleFilterMatchesException (string message, Exception innerException, Collection<MessageFilter> filters)
+ : base (message, innerException)
{
this.filters = filters;
}
public class NavigatorInvalidBodyAccessException : InvalidBodyAccessException
{
public NavigatorInvalidBodyAccessException () : base ("Not allowed to navigate to body.") {}
- public NavigatorInvalidBodyAccessException (string msg) : base (msg) {}
- public NavigatorInvalidBodyAccessException (string msg, Exception inner) : base (msg, inner) {}
+ public NavigatorInvalidBodyAccessException (string message) : base (message) {}
+ public NavigatorInvalidBodyAccessException (string message, Exception innerException) : base (message, innerException) {}
protected NavigatorInvalidBodyAccessException (SerializationInfo info, StreamingContext context)
: base (info, context) {}
}
{
protected SeekableXPathNavigator () {}
- public abstract XmlNodeOrder ComparePosition (long first, long second);
- public abstract string GetLocalName (long node_position);
- public abstract string GetName (long node_position);
- public abstract string GetNamespace (long node_position);
- public abstract XPathNodeType GetNodeType (long node_position);
- public abstract string GetValue (long node_position);
+ public abstract XmlNodeOrder ComparePosition (long firstPosition, long secondPosition);
+ public abstract string GetLocalName (long nodePosition);
+ public abstract string GetName (long nodePosition);
+ public abstract string GetNamespace (long nodePosition);
+ public abstract XPathNodeType GetNodeType (long nodePosition);
+ public abstract string GetValue (long nodePosition);
public abstract long CurrentPosition { get; set; }
}
{
}
- public XPathMessageContext (NameTable nameTable)
- : base (nameTable)
+ public XPathMessageContext (NameTable table)
+ : base (table)
{
AddNamespace ("s11", Constants.Soap11);
AddNamespace ("s12", Constants.Soap12);
get { return false; } // as documented.
}
- public override int CompareDocument (string uri1, string uri2)
+ public override int CompareDocument (string baseUri, string nextBaseUri)
{
- return String.CompareOrdinal (uri1, uri2);
+ return String.CompareOrdinal (baseUri, nextBaseUri);
}
public override bool PreserveWhitespace (XPathNavigator node)
Initialize (xpath, namespaces);
}
- public XPathMessageFilter (string xpath, XsltContext namespaces)
+ public XPathMessageFilter (string xpath, XsltContext context)
{
- Initialize (xpath, namespaces);
+ Initialize (xpath, context);
}
[MonoTODO]
}
[MonoTODO]
- public XPathMessageFilter (XmlReader reader, XsltContext namespaces)
+ public XPathMessageFilter (XmlReader reader, XsltContext context)
{
- Initialize (reader.ReadString (), namespaces);
+ Initialize (reader.ReadString (), context);
}
private void Initialize (string xpath, XmlNamespaceManager nsmgr)
{
}
- public XPathMessageFilterTable (int quota)
+ public XPathMessageFilterTable (int capacity)
{
- this.quota = quota;
+ this.quota = capacity;
}
[DataMember]
set { quota = value; }
}
- public TFilterData this [MessageFilter key] {
- get { return dict [key]; }
- set { dict [key] = value; }
+ public TFilterData this [MessageFilter filter] {
+ get { return dict [filter]; }
+ set { dict [filter] = value; }
}
public int Count {
dict [item.Key].Equals (item.Value);
}
- public bool ContainsKey (MessageFilter key)
+ public bool ContainsKey (MessageFilter filter)
{
- return dict.ContainsKey (key);
+ return dict.ContainsKey (filter);
}
- public void CopyTo (KeyValuePair<MessageFilter,TFilterData> [] array, int index)
+ public void CopyTo (KeyValuePair<MessageFilter,TFilterData> [] array, int arrayIndex)
{
- if (index < 0 || dict.Count >= array.Length - index)
- throw new ArgumentOutOfRangeException ("index");
+ if (arrayIndex < 0 || dict.Count >= array.Length - arrayIndex)
+ throw new ArgumentOutOfRangeException ("arrayIndex");
foreach (KeyValuePair<MessageFilter,TFilterData> item in dict)
- array [index++] = item;
+ array [arrayIndex++] = item;
}
public IEnumerator<KeyValuePair<MessageFilter,TFilterData>> GetEnumerator ()
return GetEnumerator ();
}
- public bool GetMatchingFilter (Message message, out MessageFilter result)
+ public bool GetMatchingFilter (Message message, out MessageFilter filter)
{
throw new NotImplementedException ();
}
- public bool GetMatchingFilter (MessageBuffer buffer, out MessageFilter result)
+ public bool GetMatchingFilter (MessageBuffer messageBuffer, out MessageFilter filter)
{
throw new NotImplementedException ();
}
throw new NotImplementedException ();
}
- public bool GetMatchingFilters (MessageBuffer buffer, ICollection<MessageFilter> results)
+ public bool GetMatchingFilters (MessageBuffer messageBuffer, ICollection<MessageFilter> results)
{
throw new NotImplementedException ();
}
throw new NotImplementedException ();
}
- public bool GetMatchingValue (MessageBuffer buffer, out TFilterData data)
+ public bool GetMatchingValue (MessageBuffer messageBuffer, out TFilterData data)
{
throw new NotImplementedException ();
}
throw new NotImplementedException ();
}
- public bool GetMatchingValues (MessageBuffer buffer, ICollection<TFilterData> results)
+ public bool GetMatchingValues (MessageBuffer messageBuffer, ICollection<TFilterData> results)
{
throw new NotImplementedException ();
}
public class XPathNavigatorException : XPathException
{
public XPathNavigatorException () : this ("Navigator node quota exceeded") {}
- public XPathNavigatorException (string msg) : base (msg) {}
- public XPathNavigatorException (string msg, Exception inner)
- : base (msg, inner) {}
+ public XPathNavigatorException (string message) : base (message) {}
+ public XPathNavigatorException (string message, Exception innerException)
+ : base (message, innerException) {}
protected XPathNavigatorException (SerializationInfo info,
StreamingContext context)
: base (info, context) {}
{
}
- public UnregisterInfo (string meshId, Guid registration_id)
+ public UnregisterInfo (string meshId, Guid registrationId)
{
Body.MeshId = meshId;
- Body.RegistrationId = registration_id;
+ Body.RegistrationId = registrationId;
}
public string MeshId {
binding = issuerBinding;
}
- protected IssuedSecurityTokenParameters (IssuedSecurityTokenParameters source)
- : base (source)
+ protected IssuedSecurityTokenParameters (IssuedSecurityTokenParameters other)
+ : base (other)
{
- binding = source.binding;
- issuer_address = source.issuer_address;
- issuer_meta_address = source.issuer_meta_address;
- key_size = source.key_size;
- key_type = source.key_type;
- token_type = source.token_type;
- reqs = new Collection<ClaimTypeRequirement> (source.reqs);
- additional_reqs = new Collection<XmlElement> (source.additional_reqs);
+ binding = other.binding;
+ issuer_address = other.issuer_address;
+ issuer_meta_address = other.issuer_meta_address;
+ key_size = other.key_size;
+ key_type = other.key_type;
+ token_type = other.token_type;
+ reqs = new Collection<ClaimTypeRequirement> (other.reqs);
+ additional_reqs = new Collection<XmlElement> (other.additional_reqs);
}
Binding binding;
{
}
- protected KerberosSecurityTokenParameters (KerberosSecurityTokenParameters source)
- : base (source)
+ protected KerberosSecurityTokenParameters (KerberosSecurityTokenParameters other)
+ : base (other)
{
}
RequireDerivedKeys = true;
}
- protected RsaSecurityTokenParameters (RsaSecurityTokenParameters source)
- : base (source)
+ protected RsaSecurityTokenParameters (RsaSecurityTokenParameters other)
+ : base (other)
{
}
}
#endif
- protected SecureConversationSecurityTokenParameters (SecureConversationSecurityTokenParameters source)
- : base (source)
+ protected SecureConversationSecurityTokenParameters (SecureConversationSecurityTokenParameters other)
+ : base (other)
{
- this.element = (SecurityBindingElement) source.element.Clone ();
- this.cancellable = source.cancellable;
+ this.element = (SecurityBindingElement) other.element.Clone ();
+ this.cancellable = other.cancellable;
#if !MOBILE && !XAMMAC_4_5
this.requirements = new ChannelProtectionRequirements (default_channel_protection_requirements);
#endif
throw new NotSupportedException (String.Format ("X509SecurityToken does not support creation of {0}.", t));
}
- public override bool MatchesKeyIdentifierClause (SecurityKeyIdentifierClause clause)
+ public override bool MatchesKeyIdentifierClause (SecurityKeyIdentifierClause keyIdentifierClause)
{
SecurityContextKeyIdentifierClause sctic =
- clause as SecurityContextKeyIdentifierClause;
+ keyIdentifierClause as SecurityContextKeyIdentifierClause;
return sctic != null && sctic.ContextId == ContextId &&
sctic.Generation == KeyGeneration;
}
this.cancel = requireCancellation;
}
- protected SslSecurityTokenParameters (SslSecurityTokenParameters source)
- : base (source)
+ protected SslSecurityTokenParameters (SslSecurityTokenParameters other)
+ : base (other)
{
- cert = source.cert;
- cancel = source.cancel;
+ cert = other.cert;
+ cancel = other.cancel;
}
bool cert, cancel;
bool extract_groups, allow_unauth;
[MonoTODO]
- public SspiSecurityToken (NetworkCredential cred,
+ public SspiSecurityToken (NetworkCredential networkCredential,
bool extractGroupsForWindowsAccounts,
bool allowUnauthenticatedCallers)
{
[MonoTODO]
public SspiSecurityToken (
TokenImpersonationLevel impersonationLevel,
- bool allowNtlm, NetworkCredential cred)
+ bool allowNtlm, NetworkCredential networkCredential)
{
throw new NotImplementedException ();
}
this.cancel = requireCancellation;
}
- protected SspiSecurityTokenParameters (SspiSecurityTokenParameters source)
- : base (source)
+ protected SspiSecurityTokenParameters (SspiSecurityTokenParameters other)
+ : base (other)
{
- this.cancel = source.cancel;
+ this.cancel = other.cancel;
}
public bool RequireCancellation {
RequireDerivedKeys = false;
}
- protected UserNameSecurityTokenParameters (UserNameSecurityTokenParameters source)
- : base (source)
+ protected UserNameSecurityTokenParameters (UserNameSecurityTokenParameters other)
+ : base (other)
{
}
InclusionMode = inclusionMode;
}
- protected X509SecurityTokenParameters (X509SecurityTokenParameters source)
- : base (source)
+ protected X509SecurityTokenParameters (X509SecurityTokenParameters other)
+ : base (other)
{
- reference_style = source.reference_style;
+ reference_style = other.reference_style;
}
public X509KeyIdentifierClauseType X509ReferenceStyle {
header_types = new ReadOnlyCollection<XmlQualifiedName> (header_types);
}
- public void Union (MessagePartSpecification other)
+ public void Union (MessagePartSpecification specification)
{
- if (other == null)
- throw new ArgumentNullException ("other");
+ if (specification == null)
+ throw new ArgumentNullException ("specification");
if (header_types.IsReadOnly)
throw new InvalidOperationException ("This MessagePartSpecification is read-only.");
- body |= other.body;
- foreach (XmlQualifiedName q in other.header_types)
+ body |= specification.body;
+ foreach (XmlQualifiedName q in specification.header_types)
// Sigh. It could be much better here.
//if (!header_types.Contains (q))
header_types.Add (q);
-//
+//
// ServiceCredentialsSecurityTokenManager.cs
//
// Author:
ServiceCredentials credentials;
public ServiceCredentialsSecurityTokenManager (
- ServiceCredentials credentials)
+ ServiceCredentials parent)
{
- this.credentials = credentials;
+ this.credentials = parent;
}
public ServiceCredentials ServiceCredentials {
[MonoTODO]
public virtual EndpointIdentity GetIdentityOfSelf (
- SecurityTokenRequirement requirement)
+ SecurityTokenRequirement tokenRequirement)
{
throw new NotImplementedException ();
}
[MonoTODO]
public override SecurityTokenAuthenticator CreateSecurityTokenAuthenticator (
- SecurityTokenRequirement requirement,
+ SecurityTokenRequirement tokenRequirement,
out SecurityTokenResolver outOfBandTokenResolver)
{
outOfBandTokenResolver = null;
- if (requirement.TokenType == SecurityTokenTypes.UserName)
- return CreateUserNameAuthenticator (requirement);
- if (requirement.TokenType == SecurityTokenTypes.X509Certificate)
- return CreateX509Authenticator (requirement);
- if (requirement.TokenType == SecurityTokenTypes.Rsa)
+ if (tokenRequirement.TokenType == SecurityTokenTypes.UserName)
+ return CreateUserNameAuthenticator (tokenRequirement);
+ if (tokenRequirement.TokenType == SecurityTokenTypes.X509Certificate)
+ return CreateX509Authenticator (tokenRequirement);
+ if (tokenRequirement.TokenType == SecurityTokenTypes.Rsa)
return new RsaSecurityTokenAuthenticator ();
- if (requirement.TokenType == ServiceModelSecurityTokenTypes.SecureConversation) {
+ if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.SecureConversation) {
SecurityBindingElement binding;
- if (!requirement.TryGetProperty<SecurityBindingElement> (ReqType.SecurityBindingElementProperty, out binding))
+ if (!tokenRequirement.TryGetProperty<SecurityBindingElement> (ReqType.SecurityBindingElementProperty, out binding))
throw new ArgumentException ("SecurityBindingElement is required in the security token requirement");
SecureConversationSecurityTokenParameters issuedParams;
- if (!requirement.TryGetProperty<SecureConversationSecurityTokenParameters> (ReqType.IssuedSecurityTokenParametersProperty, out issuedParams))
+ if (!tokenRequirement.TryGetProperty<SecureConversationSecurityTokenParameters> (ReqType.IssuedSecurityTokenParametersProperty, out issuedParams))
throw new ArgumentException ("IssuedSecurityTokenParameters are required in the security token requirement");
BindingContext issuerBC;
- if (!requirement.TryGetProperty<BindingContext> (ReqType.IssuerBindingContextProperty, out issuerBC))
+ if (!tokenRequirement.TryGetProperty<BindingContext> (ReqType.IssuerBindingContextProperty, out issuerBC))
throw new ArgumentException ("IssuerBindingContext is required in the security token requirement");
SecurityTokenVersion secVer;
- if (!requirement.TryGetProperty<SecurityTokenVersion> (ReqType.MessageSecurityVersionProperty, out secVer))
+ if (!tokenRequirement.TryGetProperty<SecurityTokenVersion> (ReqType.MessageSecurityVersionProperty, out secVer))
throw new ArgumentException ("MessageSecurityVersion property (of type SecurityTokenVersion) is required in the security token requirement");
// FIXME: get parameters from somewhere
outOfBandTokenResolver = resolver;
SecurityContextSecurityTokenAuthenticator sc =
new SecurityContextSecurityTokenAuthenticator ();
- return new SecureConversationSecurityTokenAuthenticator (requirement, sc, resolver);
+ return new SecureConversationSecurityTokenAuthenticator (tokenRequirement, sc, resolver);
}
- if (requirement.TokenType == ServiceModelSecurityTokenTypes.AnonymousSslnego)
- return CreateSslTokenAuthenticator (requirement);
- if (requirement.TokenType == ServiceModelSecurityTokenTypes.MutualSslnego)
- return CreateSslTokenAuthenticator (requirement);
- if (requirement.TokenType == ServiceModelSecurityTokenTypes.Spnego)
- return CreateSpnegoTokenAuthenticator (requirement);
+ if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.AnonymousSslnego)
+ return CreateSslTokenAuthenticator (tokenRequirement);
+ if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.MutualSslnego)
+ return CreateSslTokenAuthenticator (tokenRequirement);
+ if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.Spnego)
+ return CreateSpnegoTokenAuthenticator (tokenRequirement);
else
- throw new NotImplementedException ("Not implemented token type: " + requirement.TokenType);
+ throw new NotImplementedException ("Not implemented token type: " + tokenRequirement.TokenType);
}
SpnegoSecurityTokenAuthenticator CreateSpnegoTokenAuthenticator (SecurityTokenRequirement requirement)
[MonoTODO]
public virtual SecurityKeyIdentifierClause CreateKeyIdentifierClauseFromTokenXml (
- XmlElement tokenXml, SecurityTokenReferenceStyle referenceStyle)
+ XmlElement element, SecurityTokenReferenceStyle tokenReferenceStyle)
{
throw new NotImplementedException ();
}
public class AddressAccessDeniedException : CommunicationException
{
public AddressAccessDeniedException () : base () {}
- public AddressAccessDeniedException (string msg) : base (msg) {}
- public AddressAccessDeniedException (string msg, Exception inner) : base (msg, inner) {}
+ public AddressAccessDeniedException (string message) : base (message) {}
+ public AddressAccessDeniedException (string message, Exception innerException) : base (message, innerException) {}
protected AddressAccessDeniedException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
public class AddressAlreadyInUseException : CommunicationException
{
public AddressAlreadyInUseException () : base () {}
- public AddressAlreadyInUseException (string msg) : base (msg) {}
- public AddressAlreadyInUseException (string msg, Exception inner) : base (msg, inner) {}
+ public AddressAlreadyInUseException (string message) : base (message) {}
+ public AddressAlreadyInUseException (string message, Exception innerException) : base (message, innerException) {}
protected AddressAlreadyInUseException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
protected void InitializeEndpoint (
string configurationName,
- EndpointAddress remoteAddress)
+ EndpointAddress address)
{
InitializeEndpoint (CreateDescription ());
- if (remoteAddress != null)
- service_endpoint.Address = remoteAddress;
+ if (address != null)
+ service_endpoint.Address = address;
ApplyConfiguration (configurationName);
}
return ch;
}
- public static TChannel CreateChannel (Binding binding, EndpointAddress address)
+ public static TChannel CreateChannel (Binding binding, EndpointAddress endpointAddress)
{
- return CreateChannelCore (new ChannelFactory<TChannel> (binding, address), f => f.CreateChannel ());
+ return CreateChannelCore (new ChannelFactory<TChannel> (binding, endpointAddress), f => f.CreateChannel ());
}
- public static TChannel CreateChannel (Binding binding, EndpointAddress address, Uri via)
+ public static TChannel CreateChannel (Binding binding, EndpointAddress endpointAddress, Uri via)
{
- return CreateChannelCore (new ChannelFactory<TChannel> (binding), f => f.CreateChannel (address, via));
+ return CreateChannelCore (new ChannelFactory<TChannel> (binding), f => f.CreateChannel (endpointAddress, via));
}
public virtual TChannel CreateChannel (EndpointAddress address, Uri via)
public class ChannelTerminatedException : CommunicationException
{
public ChannelTerminatedException () : base () {}
- public ChannelTerminatedException (string msg) : base (msg) {}
- public ChannelTerminatedException (string msg, Exception inner) : base (msg, inner) {}
+ public ChannelTerminatedException (string message) : base (message) {}
+ public ChannelTerminatedException (string message, Exception innerException) : base (message, innerException) {}
protected ChannelTerminatedException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
{
}
- protected ClientBase (InstanceContext instance)
- : this (instance, "*")
+ protected ClientBase (InstanceContext callbackInstance)
+ : this (callbackInstance, "*")
{
}
- protected ClientBase (InstanceContext instance, string endpointConfigurationName)
+ protected ClientBase (InstanceContext callbackInstance, string endpointConfigurationName)
{
- if (instance == null)
+ if (callbackInstance == null)
throw new ArgumentNullException ("instanceContext");
if (endpointConfigurationName == null)
throw new ArgumentNullException ("endpointConfigurationName");
- Initialize (instance, endpointConfigurationName, null);
+ Initialize (callbackInstance, endpointConfigurationName, null);
}
- protected ClientBase (InstanceContext instance,
+ protected ClientBase (InstanceContext callbackInstance,
string endpointConfigurationName, EndpointAddress remoteAddress)
{
- if (instance == null)
+ if (callbackInstance == null)
throw new ArgumentNullException ("instanceContext");
if (endpointConfigurationName == null)
throw new ArgumentNullException ("endpointConfigurationName");
if (remoteAddress == null)
throw new ArgumentNullException ("remoteAddress");
- Initialize (instance, endpointConfigurationName, remoteAddress);
+ Initialize (callbackInstance, endpointConfigurationName, remoteAddress);
}
- protected ClientBase (InstanceContext instance,
+ protected ClientBase (InstanceContext callbackInstance,
string endpointConfigurationName, string remoteAddress)
{
- if (instance == null)
+ if (callbackInstance == null)
throw new ArgumentNullException ("instanceContext");
if (remoteAddress == null)
throw new ArgumentNullException ("endpointAddress");
if (endpointConfigurationName == null)
throw new ArgumentNullException ("endpointConfigurationName");
- Initialize (instance, endpointConfigurationName, new EndpointAddress (remoteAddress));
+ Initialize (callbackInstance, endpointConfigurationName, new EndpointAddress (remoteAddress));
}
- protected ClientBase (InstanceContext instance,
+ protected ClientBase (InstanceContext callbackInstance,
Binding binding, EndpointAddress remoteAddress)
{
- if (instance == null)
+ if (callbackInstance == null)
throw new ArgumentNullException ("instanceContext");
if (binding == null)
throw new ArgumentNullException ("binding");
if (remoteAddress == null)
throw new ArgumentNullException ("remoteAddress");
- Initialize (instance, binding, remoteAddress);
+ Initialize (callbackInstance, binding, remoteAddress);
}
protected ClientBase (ServiceEndpoint endpoint)
{
}
- protected ClientBase (InstanceContext instance, ServiceEndpoint endpoint)
- : this (instance, new ChannelFactory<TChannel> (endpoint))
+ protected ClientBase (InstanceContext callbackInstance, ServiceEndpoint endpoint)
+ : this (callbackInstance, new ChannelFactory<TChannel> (endpoint))
{
}
-//
+//
// ClientCredentialsSecurityTokenManager.cs
//
// Author:
{
ClientCredentials credentials;
- public ClientCredentialsSecurityTokenManager (ClientCredentials credentials)
+ public ClientCredentialsSecurityTokenManager (ClientCredentials clientCredentials)
{
- if (credentials == null)
- throw new ArgumentNullException ("credentials");
- this.credentials = credentials;
+ if (clientCredentials == null)
+ throw new ArgumentNullException ("clientCredentials");
+ this.credentials = clientCredentials;
}
public ClientCredentials ClientCredentials {
[MonoTODO]
public override SecurityTokenAuthenticator CreateSecurityTokenAuthenticator (
- SecurityTokenRequirement requirement,
+ SecurityTokenRequirement tokenRequirement,
out SecurityTokenResolver outOfBandTokenResolver)
{
outOfBandTokenResolver = null;
- if (requirement == null)
- throw new ArgumentNullException ("requirement");
- if (requirement.TokenType == SecurityTokenTypes.UserName) {
+ if (tokenRequirement == null)
+ throw new ArgumentNullException ("tokenRequirement");
+ if (tokenRequirement.TokenType == SecurityTokenTypes.UserName) {
// unsupported
}
- else if (requirement.TokenType == SecurityTokenTypes.Rsa)
+ else if (tokenRequirement.TokenType == SecurityTokenTypes.Rsa)
return new RsaSecurityTokenAuthenticator ();
- else if (requirement.TokenType == SecurityTokenTypes.X509Certificate)
- return CreateX509Authenticator (requirement);
- else if (requirement.TokenType == ServiceModelSecurityTokenTypes.Spnego)
- return new SspiClientSecurityTokenAuthenticator (this, requirement);
+ else if (tokenRequirement.TokenType == SecurityTokenTypes.X509Certificate)
+ return CreateX509Authenticator (tokenRequirement);
+ else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.Spnego)
+ return new SspiClientSecurityTokenAuthenticator (this, tokenRequirement);
else
- throw new NotImplementedException ("Security token type " + requirement.TokenType);
+ throw new NotImplementedException ("Security token type " + tokenRequirement.TokenType);
- throw new NotSupportedException (String.Format ("Security token requirement '{0}' is not supported to create SecurityTokenAuthenticator.", requirement));
+ throw new NotSupportedException (String.Format ("Security token requirement '{0}' is not supported to create SecurityTokenAuthenticator.", tokenRequirement));
}
#region CreateSecurityTokenProvider()
[MonoTODO]
- public override SecurityTokenProvider CreateSecurityTokenProvider (SecurityTokenRequirement requirement)
+ public override SecurityTokenProvider CreateSecurityTokenProvider (SecurityTokenRequirement tokenRequirement)
{
- if (IsIssuedSecurityTokenRequirement (requirement))
- return CreateIssuedTokenProvider (requirement);
+ if (IsIssuedSecurityTokenRequirement (tokenRequirement))
+ return CreateIssuedTokenProvider (tokenRequirement);
bool isInitiator;
// huh, they are not constants but properties.
- if (requirement.TokenType == SecurityTokenTypes.X509Certificate)
- return CreateX509SecurityTokenProvider (requirement);
- else if (requirement.TokenType == ServiceModelSecurityTokenTypes.SecureConversation)
- return CreateSecureConversationProvider (requirement);
- else if (requirement.TokenType == ServiceModelSecurityTokenTypes.AnonymousSslnego) {
- if (requirement.TryGetProperty<bool> (ReqType.IsInitiatorProperty, out isInitiator) && isInitiator)
- return CreateSslnegoProvider (requirement);
- } else if (requirement.TokenType == ServiceModelSecurityTokenTypes.MutualSslnego) {
- if (requirement.TryGetProperty<bool> (ReqType.IsInitiatorProperty, out isInitiator) && isInitiator)
- return CreateSslnegoProvider (requirement);
- } else if (requirement.TokenType == ServiceModelSecurityTokenTypes.SecurityContext) {
+ if (tokenRequirement.TokenType == SecurityTokenTypes.X509Certificate)
+ return CreateX509SecurityTokenProvider (tokenRequirement);
+ else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.SecureConversation)
+ return CreateSecureConversationProvider (tokenRequirement);
+ else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.AnonymousSslnego) {
+ if (tokenRequirement.TryGetProperty<bool> (ReqType.IsInitiatorProperty, out isInitiator) && isInitiator)
+ return CreateSslnegoProvider (tokenRequirement);
+ } else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.MutualSslnego) {
+ if (tokenRequirement.TryGetProperty<bool> (ReqType.IsInitiatorProperty, out isInitiator) && isInitiator)
+ return CreateSslnegoProvider (tokenRequirement);
+ } else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.SecurityContext) {
// FIXME: implement
- } else if (requirement.TokenType == ServiceModelSecurityTokenTypes.Spnego) {
- return CreateSpnegoProvider (requirement);
- } else if (requirement.TokenType == ServiceModelSecurityTokenTypes.SspiCredential) {
+ } else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.Spnego) {
+ return CreateSpnegoProvider (tokenRequirement);
+ } else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.SspiCredential) {
// FIXME: implement
- } else if (requirement.TokenType == SecurityTokenTypes.Rsa) {
+ } else if (tokenRequirement.TokenType == SecurityTokenTypes.Rsa) {
// FIXME: implement
- } else if (requirement.TokenType == SecurityTokenTypes.Saml) {
+ } else if (tokenRequirement.TokenType == SecurityTokenTypes.Saml) {
// FIXME: implement
- } else if (requirement.TokenType == SecurityTokenTypes.UserName)
- return CreateUserNameProvider (requirement);
- else if (requirement.TokenType == SecurityTokenTypes.Kerberos) {
- return CreateKerberosProvider (requirement);
+ } else if (tokenRequirement.TokenType == SecurityTokenTypes.UserName)
+ return CreateUserNameProvider (tokenRequirement);
+ else if (tokenRequirement.TokenType == SecurityTokenTypes.Kerberos) {
+ return CreateKerberosProvider (tokenRequirement);
}
- throw new NotSupportedException (String.Format ("Token type '{0}' is not supported", requirement.TokenType));
+ throw new NotSupportedException (String.Format ("Token type '{0}' is not supported", tokenRequirement.TokenType));
}
UserNameSecurityTokenProvider CreateUserNameProvider (
callback_instance_type = callbackInstanceType;
}
- public DuplexChannelFactory (object callbackInstance)
- : this (new InstanceContext (callbackInstance))
+ public DuplexChannelFactory (object callbackObject)
+ : this (new InstanceContext (callbackObject))
{
}
- public DuplexChannelFactory (object callbackInstance,
+ public DuplexChannelFactory (object callbackObject,
string endpointConfigurationName)
- : this (new InstanceContext (callbackInstance), endpointConfigurationName)
+ : this (new InstanceContext (callbackObject), endpointConfigurationName)
{
}
- public DuplexChannelFactory (object callbackInstance,
+ public DuplexChannelFactory (object callbackObject,
string endpointConfigurationName,
EndpointAddress remoteAddress)
- : this (new InstanceContext (callbackInstance), endpointConfigurationName, remoteAddress)
+ : this (new InstanceContext (callbackObject), endpointConfigurationName, remoteAddress)
{
}
- public DuplexChannelFactory (object callbackInstance,
+ public DuplexChannelFactory (object callbackObject,
ServiceEndpoint endpoint)
- : this (new InstanceContext (callbackInstance), endpoint)
+ : this (new InstanceContext (callbackObject), endpoint)
{
}
- public DuplexChannelFactory (object callbackInstance,
+ public DuplexChannelFactory (object callbackObject,
Binding binding)
- : this (new InstanceContext (callbackInstance), binding)
+ : this (new InstanceContext (callbackObject), binding)
{
}
- public DuplexChannelFactory (object callbackInstance,
+ public DuplexChannelFactory (object callbackObject,
Binding binding,
string remoteAddress)
- : this (callbackInstance, binding, new EndpointAddress (remoteAddress))
+ : this (callbackObject, binding, new EndpointAddress (remoteAddress))
{
}
- public DuplexChannelFactory (object callbackInstance,
+ public DuplexChannelFactory (object callbackObject,
Binding binding,
EndpointAddress remoteAddress)
- : this (new InstanceContext (callbackInstance), binding, remoteAddress)
+ : this (new InstanceContext (callbackObject), binding, remoteAddress)
{
}
}
protected DuplexClientBase (object callbackInstance,
- string bindingConfigurationName, EndpointAddress remoteAddress)
- : this (new InstanceContext (callbackInstance), bindingConfigurationName, remoteAddress)
+ string endpointConfigurationName, EndpointAddress remoteAddress)
+ : this (new InstanceContext (callbackInstance), endpointConfigurationName, remoteAddress)
{
}
}
protected DuplexClientBase (InstanceContext callbackInstance,
- string endpointConfigurationName, EndpointAddress address)
- : base (callbackInstance, endpointConfigurationName, address)
+ string endpointConfigurationName, EndpointAddress remoteAddress)
+ : base (callbackInstance, endpointConfigurationName, remoteAddress)
{
}
public void WriteTo (
AddressingVersion addressingVersion,
XmlDictionaryWriter writer,
- XmlDictionaryString localname,
+ XmlDictionaryString localName,
XmlDictionaryString ns)
{
- writer.WriteStartElement (localname, ns);
+ writer.WriteStartElement (localName, ns);
WriteContentsTo (addressingVersion, writer);
writer.WriteEndElement ();
}
public void WriteTo (
AddressingVersion addressingVersion,
- XmlWriter writer, string localname, string ns)
+ XmlWriter writer, string localName, string ns)
{
- writer.WriteStartElement (localname, ns);
+ writer.WriteStartElement (localName, ns);
WriteContentsTo (addressingVersion, writer);
writer.WriteEndElement ();
}
return new X509CertificateEndpointIdentity (primaryCertificate, supportingCertificates);
}
- public override bool Equals (object other)
+ public override bool Equals (object obj)
{
- EndpointIdentity e = other as EndpointIdentity;
+ EndpointIdentity e = obj as EndpointIdentity;
return e != null && comparer.Equals (claim, e.claim);
}
return String.Concat ("identity(", claim, ")");
}
- protected void Initialize (Claim claim)
+ protected void Initialize (Claim identityClaim)
{
- Initialize (claim, Claim.DefaultComparer);
+ Initialize (identityClaim, Claim.DefaultComparer);
}
- protected void Initialize (Claim claim, IEqualityComparer<Claim> comparer)
+ protected void Initialize (Claim identityClaim, IEqualityComparer<Claim> claimComparer)
{
- if (claim == null)
- throw new ArgumentNullException ("claim");
- if (comparer == null)
- throw new ArgumentNullException ("comparer");
- this.claim = claim;
- this.comparer = comparer;
+ if (identityClaim == null)
+ throw new ArgumentNullException ("identityClaim");
+ if (claimComparer == null)
+ throw new ArgumentNullException ("claimComparer");
+ this.claim = identityClaim;
+ this.comparer = claimComparer;
}
}
}
{
}
- public FaultException (string msg)
- : this (new FaultReason (msg))
+ public FaultException (string reason)
+ : this (new FaultReason (reason))
{
}
- public FaultException (string msg, FaultCode code)
- : this (new FaultReason (msg), code)
+ public FaultException (string reason, FaultCode code)
+ : this (new FaultReason (reason), code)
{
}
public class MsmqException : ExternalException
{
public MsmqException () : base () {}
- public MsmqException (string msg) : base (msg) {}
- public MsmqException (string msg, int win32ErrorCode) : base (msg, win32ErrorCode) {}
- public MsmqException (string msg, Exception inner) : base (msg, inner) {}
+ public MsmqException (string message) : base (message) {}
+ public MsmqException (string message, int error) : base (message, error) {}
+ public MsmqException (string message, Exception inner) : base (message, inner) {}
protected MsmqException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
public class MsmqPoisonMessageException : PoisonMessageException
{
public MsmqPoisonMessageException () : base () {}
- public MsmqPoisonMessageException (string msg) : base (msg) {}
- public MsmqPoisonMessageException (string msg, Exception inner) : base (msg, inner) {}
+ public MsmqPoisonMessageException (string message) : base (message) {}
+ public MsmqPoisonMessageException (string message, Exception innerException) : base (message, innerException) {}
protected MsmqPoisonMessageException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
-//
+//
// OptionalReliableSession.cs
//
// Author:
{
}
- public OptionalReliableSession (ReliableSessionBindingElement binding)
- : base (binding)
+ public OptionalReliableSession (ReliableSessionBindingElement reliableSessionBindingElement)
+ : base (reliableSessionBindingElement)
{
- if (binding == null)
- throw new ArgumentNullException ("binding");
+ if (reliableSessionBindingElement == null)
+ throw new ArgumentNullException ("reliableSessionBindingElement");
}
public bool Enabled {
public class PoisonMessageException : SystemException
{
public PoisonMessageException () : base () {}
- public PoisonMessageException (string msg) : base (msg) {}
- public PoisonMessageException (string msg, Exception inner) : base (msg, inner) {}
+ public PoisonMessageException (string message) : base (message) {}
+ public PoisonMessageException (string message, Exception innerException) : base (message, innerException) {}
protected PoisonMessageException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
-//
+//
// ReliableSession.cs
//
// Author:
{
}
- public ReliableSession (ReliableSessionBindingElement binding)
+ public ReliableSession (ReliableSessionBindingElement reliableSessionBindingElement)
{
- if (binding == null)
- throw new ArgumentNullException ("binding");
- InactivityTimeout = binding.InactivityTimeout;
- Ordered = binding.Ordered;
+ if (reliableSessionBindingElement == null)
+ throw new ArgumentNullException ("reliableSessionBindingElement");
+ InactivityTimeout = reliableSessionBindingElement.InactivityTimeout;
+ Ordered = reliableSessionBindingElement.Ordered;
}
public TimeSpan InactivityTimeout { get; set; }
throw new NotImplementedException ();
}
- public RsaEndpointIdentity (X509Certificate2 cert)
+ public RsaEndpointIdentity (X509Certificate2 certificate)
{
- if (cert == null)
- throw new ArgumentNullException ("cert");
- rsa = (RSA) cert.PublicKey.Key;
+ if (certificate == null)
+ throw new ArgumentNullException ("certificate");
+ rsa = (RSA) certificate.PublicKey.Key;
}
}
}
{
public class ServiceAuthorizationManager
{
- public virtual bool CheckAccess (OperationContext context)
+ public virtual bool CheckAccess (OperationContext operationContext)
{
- return CheckAccessCore (context);
+ return CheckAccessCore (operationContext);
}
- public virtual bool CheckAccess (OperationContext context, ref Message message)
+ public virtual bool CheckAccess (OperationContext operationContext, ref Message message)
{
- return CheckAccessCore (context);
+ return CheckAccessCore (operationContext);
}
[MonoTODO]
- protected virtual bool CheckAccessCore (OperationContext context)
+ protected virtual bool CheckAccessCore (OperationContext operationContext)
{
return false;
}
[MonoTODO]
- protected virtual ReadOnlyCollection<IAuthorizationPolicy> GetAuthorizationPolicies (OperationContext context)
+ protected virtual ReadOnlyCollection<IAuthorizationPolicy> GetAuthorizationPolicies (OperationContext operationContext)
{
throw new NotImplementedException ();
}
{
}
- public ServiceHost (object serviceInstance,
+ public ServiceHost (object singletonInstance,
params Uri [] baseAddresses)
{
- if (serviceInstance == null)
- throw new ArgumentNullException ("serviceInstance");
- InitializeDescription (serviceInstance,
+ if (singletonInstance == null)
+ throw new ArgumentNullException ("singletonInstance");
+ InitializeDescription (singletonInstance,
new UriSchemeKeyedCollection (baseAddresses));
}
InitializeDescription (baseAddresses);
}
- protected void InitializeDescription (object serviceInstance, UriSchemeKeyedCollection baseAddresses)
+ protected void InitializeDescription (object singletonInstance, UriSchemeKeyedCollection baseAddresses)
{
- instance = serviceInstance;
- InitializeDescription (serviceInstance.GetType (), baseAddresses);
+ instance = singletonInstance;
+ InitializeDescription (singletonInstance.GetType (), baseAddresses);
}
}
}
throw new InvalidOperationException ("The ServiceHost must have at least one application endpoint (that does not include metadata exchange endpoint) defined by either configuration, behaviors or call to AddServiceEndpoint methods.");
}
- protected void LoadConfigurationSection (ServiceElement element)
+ protected void LoadConfigurationSection (ServiceElement serviceSection)
{
- ApplyServiceElement (element);
+ ApplyServiceElement (serviceSection);
}
protected override sealed void OnAbort ()
public class UriSchemeKeyedCollection
: SynchronizedKeyedCollection<string, Uri>
{
- public UriSchemeKeyedCollection (params Uri [] uris)
+ public UriSchemeKeyedCollection (params Uri [] addresses)
: base (new object ())
{
- if (uris == null)
+ if (addresses == null)
/* FIXME: masterinfo says, param name should be
baseAddresses */
- throw new ArgumentNullException ("uris");
+ throw new ArgumentNullException ("addresses");
- for (int i = 0; i < uris.Length; i ++) {
- if (!uris [i].IsAbsoluteUri)
+ for (int i = 0; i < addresses.Length; i ++) {
+ if (!addresses [i].IsAbsoluteUri)
throw new ArgumentException ("Only an absolute URI can be used as a base address");
- if (Contains (uris [i].Scheme))
- throw new ArgumentException ("Collection already contains an address with scheme "+ uris [i].Scheme);
- if (uris [i].Query != String.Empty)
+ if (Contains (addresses [i].Scheme))
+ throw new ArgumentException ("Collection already contains an address with scheme "+ addresses [i].Scheme);
+ if (addresses [i].Query != String.Empty)
throw new ArgumentException ("A base address cannot contain a query string.");
- InsertItem (i, uris [i]);
+ InsertItem (i, addresses [i]);
}
}
-//
+//
// WS2007FederationHttpBinding.cs
//
// Author:
}
[MonoTODO]
- public WS2007FederationHttpBinding (string configurationName)
- : base (configurationName)
+ public WS2007FederationHttpBinding (string configName)
+ : base (configName)
{
throw new NotImplementedException ();
}
-//
+//
// WS2007HttpBinding.cs
//
// Author:
{
}
- public WS2007HttpBinding (SecurityMode mode)
- : base (mode)
+ public WS2007HttpBinding (SecurityMode securityMode)
+ : base (securityMode)
{
}
- public WS2007HttpBinding (SecurityMode mode, bool reliableSessionEnabled)
- : base (mode, reliableSessionEnabled)
+ public WS2007HttpBinding (SecurityMode securityMode, bool reliableSessionEnabled)
+ : base (securityMode, reliableSessionEnabled)
{
}
[MonoTODO]
- public WS2007HttpBinding (string configurationName)
- : base (configurationName)
+ public WS2007HttpBinding (string configName)
+ : base (configName)
{
}
}
}
[MonoTODO]
- public WSFederationHttpBinding (string configurationName)
+ public WSFederationHttpBinding (string configName)
{
throw new NotImplementedException ();
}
-//
+//
// WSHttpBinding.cs
//
// Author:
{
}
- public WSHttpBinding (SecurityMode mode)
- : this (mode, false)
+ public WSHttpBinding (SecurityMode securityMode)
+ : this (securityMode, false)
{
}
- public WSHttpBinding (SecurityMode mode,
+ public WSHttpBinding (SecurityMode securityMode,
bool reliableSessionEnabled)
: base (reliableSessionEnabled)
{
- security = new WSHttpSecurity (mode);
+ security = new WSHttpSecurity (securityMode);
}
[MonoTODO]
- public WSHttpBinding (string configurationName)
+ public WSHttpBinding (string configName)
{
throw new NotImplementedException ();
}
X509Certificate2 primary;
X509Certificate2Collection supporting, all;
- public X509CertificateEndpointIdentity (X509Certificate2 cert)
+ public X509CertificateEndpointIdentity (X509Certificate2 certificate)
{
- if (cert == null)
- throw new ArgumentNullException ("cert");
- primary = cert;
- Initialize (Claim.CreateThumbprintClaim (cert.GetCertHash ()));
+ if (certificate == null)
+ throw new ArgumentNullException ("certificate");
+ primary = certificate;
+ Initialize (Claim.CreateThumbprintClaim (certificate.GetCertHash ()));
}
public X509CertificateEndpointIdentity (
this.options = options;
}
- public IAsyncResult BeginCommit (AsyncCallback callback,
- object user_defined_state)
+ public IAsyncResult BeginCommit (AsyncCallback asyncCallback,
+ object asyncState)
{
- this.callback = callback;
- this.user_defined_state = user_defined_state;
+ this.callback = asyncCallback;
+ this.user_defined_state = asyncState;
AsyncCallback cb = null;
- if (callback != null)
+ if (asyncCallback != null)
cb = new AsyncCallback (CommitCallback);
asyncResult = BeginCommitInternal (cb);
return this;
}
- public void EndCommit (IAsyncResult ar)
+ public void EndCommit (IAsyncResult asyncResult)
{
- if (ar != this)
+ if (asyncResult != this)
throw new ArgumentException ("The IAsyncResult parameter must be the same parameter as returned by BeginCommit.", "asyncResult");
- EndCommitInternal (asyncResult);
+ EndCommitInternal (this.asyncResult);
}
private void CommitCallback (IAsyncResult ar)
[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
public interface IDtcTransaction
{
- void Abort (IntPtr manager, int whatever, int whatever2);
+ void Abort (IntPtr reason, int retaining, int async);
- void Commit (int whatever, int whatever2, int whatever3);
+ void Commit (int retaining, int commitType, int reserved);
- void GetTransactionInfo (IntPtr whatever);
+ void GetTransactionInfo (IntPtr transactionInformation);
}
}
{
void Initialize ();
- void Rollback (SinglePhaseEnlistment enlistment);
+ void Rollback (SinglePhaseEnlistment singlePhaseEnlistment);
- void SinglePhaseCommit (SinglePhaseEnlistment enlistment);
+ void SinglePhaseCommit (SinglePhaseEnlistment singlePhaseEnlistment);
}
}
public interface ISinglePhaseNotification
: IEnlistmentNotification
{
- void SinglePhaseCommit (SinglePhaseEnlistment enlistment);
+ void SinglePhaseCommit (SinglePhaseEnlistment singlePhaseEnlistment);
}
}
}
[MonoTODO]
- public void ForceRollback (Exception ex)
+ public void ForceRollback (Exception e)
{
- tx.Rollback (ex, enlisted);
+ tx.Rollback (e, enlisted);
/* See test RMFail2 */
((ManualResetEvent) waitHandle).Set ();
}
[Serializable]
public sealed class SubordinateTransaction : Transaction
{
- public SubordinateTransaction (IsolationLevel level,
+ public SubordinateTransaction (IsolationLevel isoLevel,
ISimpleTransactionSuperior superior)
{
throw new NotImplementedException ();
[MonoTODO]
public DependentTransaction DependentClone (
- DependentCloneOption option)
+ DependentCloneOption cloneOption)
{
DependentTransaction d =
- new DependentTransaction (this, option);
+ new DependentTransaction (this, cloneOption);
dependents.Add (d);
return d;
}
[MonoTODO ("Only SinglePhase commit supported for durable resource managers.")]
[PermissionSetAttribute (SecurityAction.LinkDemand)]
- public Enlistment EnlistDurable (Guid manager,
- IEnlistmentNotification notification,
- EnlistmentOptions options)
+ public Enlistment EnlistDurable (Guid resourceManagerIdentifier,
+ IEnlistmentNotification enlistmentNotification,
+ EnlistmentOptions enlistmentOptions)
{
throw new NotImplementedException ("DTC unsupported, only SinglePhase commit supported for durable resource managers.");
}
[MonoTODO ("Only Local Transaction Manager supported. Cannot have more than 1 durable resource per transaction. Only EnlistmentOptions.None supported yet.")]
[PermissionSetAttribute (SecurityAction.LinkDemand)]
- public Enlistment EnlistDurable (Guid manager,
- ISinglePhaseNotification notification,
- EnlistmentOptions options)
+ public Enlistment EnlistDurable (Guid resourceManagerIdentifier,
+ ISinglePhaseNotification singlePhaseNotification,
+ EnlistmentOptions enlistmentOptions)
{
EnsureIncompleteCurrentScope ();
if (pspe != null || Durables.Count > 0)
throw new NotImplementedException ("DTC unsupported, multiple durable resource managers aren't supported.");
- if (options != EnlistmentOptions.None)
+ if (enlistmentOptions != EnlistmentOptions.None)
throw new NotImplementedException ("EnlistmentOptions other than None aren't supported");
- Durables.Add (notification);
+ Durables.Add (singlePhaseNotification);
/* FIXME: Enlistment ?? */
return new Enlistment ();
}
public bool EnlistPromotableSinglePhase (
- IPromotableSinglePhaseNotification notification)
+ IPromotableSinglePhaseNotification promotableSinglePhaseNotification)
{
EnsureIncompleteCurrentScope ();
if (pspe != null || Durables.Count > 0)
return false;
- pspe = notification;
+ pspe = promotableSinglePhaseNotification;
pspe.Initialize();
return true;
[MonoTODO ("EnlistmentOptions being ignored")]
public Enlistment EnlistVolatile (
- IEnlistmentNotification notification,
- EnlistmentOptions options)
+ IEnlistmentNotification enlistmentNotification,
+ EnlistmentOptions enlistmentOptions)
{
- return EnlistVolatileInternal (notification, options);
+ return EnlistVolatileInternal (enlistmentNotification, enlistmentOptions);
}
[MonoTODO ("EnlistmentOptions being ignored")]
public Enlistment EnlistVolatile (
- ISinglePhaseNotification notification,
- EnlistmentOptions options)
+ ISinglePhaseNotification singlePhaseNotification,
+ EnlistmentOptions enlistmentOptions)
{
/* FIXME: Anything extra reqd for this? */
- return EnlistVolatileInternal (notification, options);
+ return EnlistVolatileInternal (singlePhaseNotification, enlistmentOptions);
}
private Enlistment EnlistVolatileInternal (
Rollback (null);
}
- public void Rollback (Exception ex)
+ public void Rollback (Exception e)
{
EnsureIncompleteCurrentScope ();
- Rollback (ex, null);
+ Rollback (e, null);
}
internal void Rollback (Exception ex, object abortingEnlisted)
[MonoTODO]
public static byte [] GetExportCookie (Transaction transaction,
- byte [] exportCookie)
+ byte [] whereabouts)
{
throw new NotImplementedException ();
}
[MonoTODO]
public static Transaction GetTransactionFromDtcTransaction (
- IDtcTransaction dtc)
+ IDtcTransaction transactionNative)
{
throw new NotImplementedException ();
}
[MonoTODO]
public static Transaction GetTransactionFromExportCookie (
- byte [] exportCookie)
+ byte [] cookie)
{
throw new NotImplementedException ();
}
[MonoTODO]
- public static Transaction GetTransactionFromTransmitterPropagationToken (byte [] token)
+ public static Transaction GetTransactionFromTransmitterPropagationToken (byte [] propagationToken)
{
throw new NotImplementedException ();
}
}
[MonoTODO ("Not implemented")]
- public static void RecoveryComplete (Guid manager)
+ public static void RecoveryComplete (Guid resourceManagerIdentifier)
{
throw new NotImplementedException ();
}
[MonoTODO ("Not implemented")]
- public static Enlistment Reenlist (Guid manager,
- byte[] recoveryInfo,
- IEnlistmentNotification notification)
+ public static Enlistment Reenlist (Guid resourceManagerIdentifier,
+ byte[] recoveryInformation,
+ IEnlistmentNotification enlistmentNotification)
{
throw new NotImplementedException ();
}
set { timeout = value; }
}
- public static bool operator == (TransactionOptions o1,
- TransactionOptions o2)
+ public static bool operator == (TransactionOptions x,
+ TransactionOptions y)
{
- return o1.level == o2.level &&
- o1.timeout == o2.timeout;
+ return x.level == y.level &&
+ x.timeout == y.timeout;
}
- public static bool operator != (TransactionOptions o1,
- TransactionOptions o2)
+ public static bool operator != (TransactionOptions x,
+ TransactionOptions y)
{
- return o1.level != o2.level ||
- o1.timeout != o2.timeout;
+ return x.level != y.level ||
+ x.timeout != y.timeout;
}
public override bool Equals (object obj)
{
}
- public TransactionScope(TransactionScopeAsyncFlowOption asyncFlow)
+ public TransactionScope(TransactionScopeAsyncFlowOption asyncFlowOption)
: this(TransactionScopeOption.Required,
- TransactionManager.DefaultTimeout, asyncFlow)
+ TransactionManager.DefaultTimeout, asyncFlowOption)
{
}
- public TransactionScope (Transaction transaction)
- : this (transaction, TransactionManager.DefaultTimeout)
+ public TransactionScope (Transaction transactionToUse)
+ : this (transactionToUse, TransactionManager.DefaultTimeout)
{
}
- public TransactionScope (Transaction transaction,
- TimeSpan timeout)
- : this (transaction, timeout, DTCOption.None)
+ public TransactionScope (Transaction transactionToUse,
+ TimeSpan scopeTimeout)
+ : this (transactionToUse, scopeTimeout, DTCOption.None)
{
}
[MonoTODO ("EnterpriseServicesInteropOption not supported.")]
- public TransactionScope (Transaction transaction,
- TimeSpan timeout, DTCOption opt)
+ public TransactionScope (Transaction transactionToUse,
+ TimeSpan scopeTimeout, DTCOption interopOption)
{
Initialize (TransactionScopeOption.Required,
- transaction, defaultOptions, opt, timeout, TransactionScopeAsyncFlowOption.Suppress);
+ transactionToUse, defaultOptions, interopOption, scopeTimeout, TransactionScopeAsyncFlowOption.Suppress);
}
- public TransactionScope (TransactionScopeOption option)
- : this (option, TransactionManager.DefaultTimeout)
+ public TransactionScope (TransactionScopeOption scopeOption)
+ : this (scopeOption, TransactionManager.DefaultTimeout)
{
}
- public TransactionScope (TransactionScopeOption option,
- TimeSpan timeout)
- : this (option, timeout, TransactionScopeAsyncFlowOption.Suppress)
+ public TransactionScope (TransactionScopeOption scopeOption,
+ TimeSpan scopeTimeout)
+ : this (scopeOption, scopeTimeout, TransactionScopeAsyncFlowOption.Suppress)
{
}
{
}
- public TransactionScope (TransactionScopeOption option,
- TimeSpan timeout, TransactionScopeAsyncFlowOption asyncFlow)
+ public TransactionScope (TransactionScopeOption scopeOption,
+ TimeSpan scopeTimeout, TransactionScopeAsyncFlowOption asyncFlow)
{
- Initialize (option, null, defaultOptions,
- DTCOption.None, timeout, asyncFlow);
+ Initialize (scopeOption, null, defaultOptions,
+ DTCOption.None, scopeTimeout, asyncFlow);
}
public TransactionScope (TransactionScopeOption scopeOption,
- TransactionOptions options)
- : this (scopeOption, options, DTCOption.None)
+ TransactionOptions transactionOptions)
+ : this (scopeOption, transactionOptions, DTCOption.None)
{
}
[MonoTODO ("EnterpriseServicesInteropOption not supported")]
public TransactionScope (TransactionScopeOption scopeOption,
- TransactionOptions options,
- DTCOption opt)
+ TransactionOptions transactionOptions,
+ DTCOption interopOption)
{
- Initialize (scopeOption, null, options, opt,
+ Initialize (scopeOption, null, transactionOptions, interopOption,
TransactionManager.DefaultTimeout, TransactionScopeAsyncFlowOption.Suppress);
}
void Initialize (TransactionScopeOption scopeOption,
Transaction tx, TransactionOptions options,
- DTCOption interop, TimeSpan timeout, TransactionScopeAsyncFlowOption asyncFlow)
+ DTCOption interop, TimeSpan scopeTimeout, TransactionScopeAsyncFlowOption asyncFlow)
{
completed = false;
isRoot = false;
nested = 0;
asyncFlowEnabled = asyncFlow == TransactionScopeAsyncFlowOption.Enabled;
- if (timeout < TimeSpan.Zero)
- throw new ArgumentOutOfRangeException ("timeout");
+ if (scopeTimeout < TimeSpan.Zero)
+ throw new ArgumentOutOfRangeException ("scopeTimeout");
- this.timeout = timeout;
+ this.timeout = scopeTimeout;
oldTransaction = Transaction.CurrentInternal;
TransactionScope scope = new TransactionScope (TransactionScopeOption.Required, TimeSpan.FromSeconds (-1));
Assert.Fail ("Expected exception when passing TransactionScopeOption and an invalid TimeSpan.");
} catch (ArgumentOutOfRangeException ex) {
- Assert.AreEqual (ex.ParamName, "timeout");
+ Assert.AreEqual ("scopeTimeout", ex.ParamName);
}
try {
TransactionScope scope = new TransactionScope (null, TimeSpan.FromSeconds (-1));
Assert.Fail ("Expected exception when passing TransactionScopeOption and an invalid TimeSpan.");
} catch (ArgumentOutOfRangeException ex) {
- Assert.AreEqual (ex.ParamName, "timeout");
+ Assert.AreEqual ("scopeTimeout", ex.ParamName);
}
}
{
}
- public abstract bool ChangePassword (string name, string oldPwd, string newPwd);
- public abstract bool ChangePasswordQuestionAndAnswer (string name, string password, string newPwdQuestion, string newPwdAnswer);
- public abstract MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status);
- public abstract bool DeleteUser (string name, bool deleteAllRelatedData);
+ public abstract bool ChangePassword (string username, string oldPassword, string newPassword);
+ public abstract bool ChangePasswordQuestionAndAnswer (string username, string password, string newPasswordQuestion, string newPasswordAnswer);
+ public abstract MembershipUser CreateUser (string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status);
+ public abstract bool DeleteUser (string username, bool deleteAllRelatedData);
public abstract MembershipUserCollection FindUsersByEmail (string emailToMatch, int pageIndex, int pageSize, out int totalRecords);
- public abstract MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords);
+ public abstract MembershipUserCollection FindUsersByName (string usernameToMatch, int pageIndex, int pageSize, out int totalRecords);
public abstract MembershipUserCollection GetAllUsers (int pageIndex, int pageSize, out int totalRecords);
public abstract int GetNumberOfUsersOnline ();
- public abstract string GetPassword (string name, string answer);
- public abstract MembershipUser GetUser (string name, bool userIsOnline);
+ public abstract string GetPassword (string username, string answer);
+ public abstract MembershipUser GetUser (string username, bool userIsOnline);
public abstract MembershipUser GetUser (object providerUserKey, bool userIsOnline);
public abstract string GetUserNameByEmail (string email);
- public abstract string ResetPassword (string name, string answer);
+ public abstract string ResetPassword (string username, string answer);
public abstract void UpdateUser (MembershipUser user);
- public abstract bool ValidateUser (string name, string password);
+ public abstract bool ValidateUser (string username, string password);
public abstract bool UnlockUser (string userName);
public abstract string ApplicationName { get; set; }
public abstract string PasswordStrengthRegularExpression { get; }
public abstract bool RequiresUniqueEmail { get; }
- protected virtual void OnValidatingPassword (ValidatePasswordEventArgs args)
+ protected virtual void OnValidatingPassword (ValidatePasswordEventArgs e)
{
MembershipValidatePasswordEventHandler eh = events [validatingPasswordEvent] as MembershipValidatePasswordEventHandler;
if (eh != null)
- eh (this, args);
+ eh (this, e);
}
protected virtual byte [] DecryptPassword (byte [] encodedPassword)
return GetPassword (null);
}
- public virtual string GetPassword (string answer)
+ public virtual string GetPassword (string passwordAnswer)
{
- return Provider.GetPassword (UserName, answer);
+ return Provider.GetPassword (UserName, passwordAnswer);
}
public virtual string ResetPassword ()
return ResetPassword (null);
}
- public virtual string ResetPassword (string answer)
+ public virtual string ResetPassword (string passwordAnswer)
{
- string newPass = Provider.ResetPassword (UserName, answer);
+ string newPass = Provider.ResetPassword (UserName, passwordAnswer);
UpdateUser ();
{
}
- public abstract void AddUsersToRoles (string [] usernames, string [] rolenames);
- public abstract void CreateRole (string rolename);
- public abstract bool DeleteRole (string rolename, bool throwOnPopulatedRole);
+ public abstract void AddUsersToRoles (string [] usernames, string [] roleNames);
+ public abstract void CreateRole (string roleName);
+ public abstract bool DeleteRole (string roleName, bool throwOnPopulatedRole);
public abstract string [] FindUsersInRole (string roleName, string usernameToMatch);
public abstract string [] GetAllRoles ();
public abstract string [] GetRolesForUser (string username);
- public abstract string [] GetUsersInRole (string rolename);
- public abstract bool IsUserInRole (string username, string rolename);
- public abstract void RemoveUsersFromRoles (string [] usernames, string [] rolenames);
- public abstract bool RoleExists (string rolename);
+ public abstract string [] GetUsersInRole (string roleName);
+ public abstract bool IsUserInRole (string username, string roleName);
+ public abstract void RemoveUsersFromRoles (string [] usernames, string [] roleNames);
+ public abstract bool RoleExists (string roleName);
public abstract string ApplicationName { get; set; }
}
}
-//\r
+//\r
// ScriptModule.cs\r
//\r
// Author:\r
{\r
public class ScriptModule : IHttpModule\r
{\r
- protected virtual void Init (HttpApplication context) {\r
- context.PreSendRequestHeaders += new EventHandler (PreSendRequestHeaders);\r
- context.PostAcquireRequestState += new EventHandler (PostAcquireRequestState);\r
- context.AuthenticateRequest += new EventHandler (AuthenticateRequest);\r
+ protected virtual void Init (HttpApplication app) {\r
+ app.PreSendRequestHeaders += new EventHandler (PreSendRequestHeaders);\r
+ app.PostAcquireRequestState += new EventHandler (PostAcquireRequestState);\r
+ app.AuthenticateRequest += new EventHandler (AuthenticateRequest);\r
}\r
\r
void AuthenticateRequest (object sender, EventArgs e) {\r
-//
+//
// ScriptResourceAttribute.cs
//
// Author:
string _scriptResourceName;
string _typeName;
- public ScriptResourceAttribute (string scriptName, string scriptResourceName, string typeName) {
+ public ScriptResourceAttribute (string scriptName, string stringResourceName, string stringResourceClientTypeName) {
_scriptName = scriptName;
- _scriptResourceName = scriptResourceName;
- _typeName = typeName;
+ _scriptResourceName = stringResourceName;
+ _typeName = stringResourceClientTypeName;
}
public string ScriptName {
properties = new ConfigurationPropertyCollection();
}
- public void Add (AssemblyInfo info)
+ public void Add (AssemblyInfo assemblyInformation)
{
- BaseAdd (info, false);
+ BaseAdd (assemblyInformation, false);
}
public void Clear ()
set { if (BaseGet(index) != null) BaseRemoveAt(index); BaseAdd(index, value); }
}
- public new BufferModeSettings this [string name] {
- get { return (BufferModeSettings) BaseGet (name); }
+ public new BufferModeSettings this [string key] {
+ get { return (BufferModeSettings) BaseGet (key); }
}
protected internal override ConfigurationPropertyCollection Properties {
set { if (BaseGet (index) != null) BaseRemoveAt (index); BaseAdd (index, value); }
}
- public new EventMappingSettings this [string name] {
- get { return (EventMappingSettings) BaseGet (name); }
+ public new EventMappingSettings this [string key] {
+ get { return (EventMappingSettings) BaseGet (key); }
}
protected internal override ConfigurationPropertyCollection Properties {
{
}
- public void Add (HttpModuleAction httpModuleAction)
+ public void Add (HttpModuleAction httpModule)
{
- BaseAdd (httpModuleAction);
+ BaseAdd (httpModule);
}
public void Clear ()
BaseRemoveAt (index);
}
- public new ProfileSettings this [string name] {
- get { return (ProfileSettings)BaseGet (name); }
+ public new ProfileSettings this [string key] {
+ get { return (ProfileSettings)BaseGet (key); }
}
public ProfileSettings this [int index] {
groupSettings = new ProfileGroupSettingsCollection ();
}
- public override bool Equals (object obj)
+ public override bool Equals (object rootProfilePropertySettingsCollection)
{
- RootProfilePropertySettingsCollection col = obj as RootProfilePropertySettingsCollection;
+ RootProfilePropertySettingsCollection col = rootProfilePropertySettingsCollection as RootProfilePropertySettingsCollection;
if (col == null)
return false;
BaseRemoveAt (index);
}
- public new RuleSettings this [string name] {
- get { return (RuleSettings) BaseGet (name); }
+ public new RuleSettings this [string key] {
+ get { return (RuleSettings) BaseGet (key); }
}
public RuleSettings this [int index] {
this.MappedTagType = mappedTagTypeName;
}
- public override bool Equals (object map)
+ public override bool Equals (object o)
{
- TagMapInfo info = map as TagMapInfo;
+ TagMapInfo info = o as TagMapInfo;
if (info == null)
return false;
get { return "trustLevel"; }
}
- public new TrustLevel this [string name] {
- get { return (TrustLevel) BaseGet (name); }
+ public new TrustLevel this [string key] {
+ get { return (TrustLevel) BaseGet (key); }
}
public TrustLevel this [int index] {
public interface IAppManagerAppDomainFactory
{
[return: MarshalAs (UnmanagedType.Interface)]
- object Create ([In, MarshalAs(UnmanagedType.BStr)] string s,
- [In, MarshalAs(UnmanagedType.BStr)] string app_id);
+ object Create ([In, MarshalAs(UnmanagedType.BStr)] string appId,
+ [In, MarshalAs(UnmanagedType.BStr)] string appPath);
void Stop ();
}
}
{
public interface IWebEventCustomEvaluator
{
- bool CanFire (WebBaseEvent raised_event, RuleFiringRecord record);
+ bool CanFire (WebBaseEvent raisedEvent, RuleFiringRecord record);
}
}
object event_source;
int event_code, event_detail_code;
- protected WebBaseEvent (string message, object event_source, int event_code)
+ protected WebBaseEvent (string message, object eventSource, int eventCode)
{
this.message = message;
- this.event_source = event_source;
- this.event_code = event_code;
+ this.event_source = eventSource;
+ this.event_code = eventCode;
}
- protected WebBaseEvent (string message, object event_source, int event_code, int event_detail_code)
+ protected WebBaseEvent (string message, object eventSource, int eventCode, int eventDetailCode)
{
this.message = message;
- this.event_source = event_source;
- this.event_code = event_code;
- this.event_detail_code = event_detail_code;
+ this.event_source = eventSource;
+ this.event_code = eventCode;
+ this.event_detail_code = eventDetailCode;
}
public static WebApplicationInformation ApplicationInformation {
throw new NotImplementedException ();
}
- public static void Raise (WebBaseEvent event_raised)
+ public static void Raise (WebBaseEvent eventRaised)
{
throw new NotImplementedException ();
}
throw new NotImplementedException ();
}
- public virtual string ToString (bool include_app_info, bool include_custom_event_details)
+ public virtual string ToString (bool includeAppInfo, bool includeCustomEventDetails)
{
throw new NotImplementedException ();
}
public class ActiveDirectoryMembershipProvider : MembershipProvider {
[MonoTODO ("Not implemented")]
- public override bool ChangePassword (string username, string oldPwd, string newPwd)
+ public override bool ChangePassword (string username, string oldPassword, string newPassword)
{
throw new NotImplementedException ();
}
[MonoTODO ("Not implemented")]
- public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
+ public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPasswordQuestion, string newPasswordAnswer)
{
throw new NotImplementedException ();
}
[MonoTODO ("Not implemented")]
- public override MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
+ public override MembershipUser CreateUser (string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
{
throw new NotImplementedException ();
}
}
[MonoTODO ("Not implemented")]
- public override MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
+ public override MembershipUserCollection FindUsersByName (string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
{
throw new NotImplementedException ();
}
}
[MonoTODO("Not implemented")]
- public override string GetPassword (string username, string answer)
+ public override string GetPassword (string username, string passwordAnswer)
{
throw new NotImplementedException ();
}
}
[MonoTODO("Not implemented")]
- public override string ResetPassword (string username, string answer)
+ public override string ResetPassword (string username, string passwordAnswer)
{
throw new NotImplementedException ();
}
}
[MonoTODO("Not implemented")]
- public override bool UnlockUser (string userName)
+ public override bool UnlockUser (string username)
{
throw new NotImplementedException ();
}
return usr;
}
- public static MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, out MembershipCreateStatus status)
+ public static MembershipUser CreateUser (string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, out MembershipCreateStatus status)
{
- return CreateUser (username, password, email, pwdQuestion, pwdAnswer, isApproved, null, out status);
+ return CreateUser (username, password, email, passwordQuestion, passwordAnswer, isApproved, null, out status);
}
- public static MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
+ public static MembershipUser CreateUser (string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
{
if (String.IsNullOrEmpty (username)) {
status = MembershipCreateStatus.InvalidUserName;
return null;
}
- return Provider.CreateUser (username, password, email, pwdQuestion, pwdAnswer, isApproved, providerUserKey, out status);
+ return Provider.CreateUser (username, password, email, passwordQuestion, passwordAnswer, isApproved, providerUserKey, out status);
}
public static bool DeleteUser (string username)
return Provider.GetUser (providerUserKey, userIsOnline);
}
- public static string GetUserNameByEmail (string email)
+ public static string GetUserNameByEmail (string emailToMatch)
{
- return Provider.GetUserNameByEmail (email);
+ return Provider.GetUserNameByEmail (emailToMatch);
}
public static void UpdateUser (MembershipUser user)
return Provider.FindUsersByEmail (emailToMatch, pageIndex, pageSize, out totalRecords);
}
- public static MembershipUserCollection FindUsersByName (string nameToMatch)
+ public static MembershipUserCollection FindUsersByName (string usernameToMatch)
{
int totalRecords;
- return Provider.FindUsersByName (nameToMatch, 0, int.MaxValue, out totalRecords);
+ return Provider.FindUsersByName (usernameToMatch, 0, int.MaxValue, out totalRecords);
}
- public static MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
+ public static MembershipUserCollection FindUsersByName (string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
{
- return Provider.FindUsersByName (nameToMatch, pageIndex, pageSize, out totalRecords);
+ return Provider.FindUsersByName (usernameToMatch, pageIndex, pageSize, out totalRecords);
}
public static string ApplicationName {
}
- public static void AddUsersToRole (string [] usernames, string rolename)
+ public static void AddUsersToRole (string [] usernames, string roleName)
{
- Provider.AddUsersToRoles (usernames, new string[] {rolename});
+ Provider.AddUsersToRoles (usernames, new string[] {roleName});
}
- public static void AddUsersToRoles (string [] usernames, string [] rolenames)
+ public static void AddUsersToRoles (string [] usernames, string [] roleNames)
{
- Provider.AddUsersToRoles (usernames, rolenames);
+ Provider.AddUsersToRoles (usernames, roleNames);
}
- public static void AddUserToRole (string username, string rolename)
+ public static void AddUserToRole (string username, string roleName)
{
- Provider.AddUsersToRoles (new string[] {username}, new string[] {rolename});
+ Provider.AddUsersToRoles (new string[] {username}, new string[] {roleName});
}
- public static void AddUserToRoles (string username, string [] rolenames)
+ public static void AddUserToRoles (string username, string [] roleNames)
{
- Provider.AddUsersToRoles (new string[] {username}, rolenames);
+ Provider.AddUsersToRoles (new string[] {username}, roleNames);
}
- public static void CreateRole (string rolename)
+ public static void CreateRole (string roleName)
{
- Provider.CreateRole (rolename);
+ Provider.CreateRole (roleName);
}
public static void DeleteCookie ()
}
}
- public static bool DeleteRole (string rolename)
+ public static bool DeleteRole (string roleName)
{
- return Provider.DeleteRole (rolename, true);
+ return Provider.DeleteRole (roleName, true);
}
- public static bool DeleteRole (string rolename, bool throwOnPopulatedRole)
+ public static bool DeleteRole (string roleName, bool throwOnPopulatedRole)
{
- return Provider.DeleteRole (rolename, throwOnPopulatedRole);
+ return Provider.DeleteRole (roleName, throwOnPopulatedRole);
}
public static string [] GetAllRoles ()
return Provider.GetRolesForUser (username);
}
- public static string [] GetUsersInRole (string rolename)
+ public static string [] GetUsersInRole (string roleName)
{
- return Provider.GetUsersInRole (rolename);
+ return Provider.GetUsersInRole (roleName);
}
- public static bool IsUserInRole (string rolename)
+ public static bool IsUserInRole (string roleName)
{
- return IsUserInRole (CurrentUser, rolename);
+ return IsUserInRole (CurrentUser, roleName);
}
- public static bool IsUserInRole (string username, string rolename)
+ public static bool IsUserInRole (string username, string roleName)
{
if (String.IsNullOrEmpty (username))
return false;
- return Provider.IsUserInRole (username, rolename);
+ return Provider.IsUserInRole (username, roleName);
}
- public static void RemoveUserFromRole (string username, string rolename)
+ public static void RemoveUserFromRole (string username, string roleName)
{
- Provider.RemoveUsersFromRoles (new string[] {username}, new string[] {rolename});
+ Provider.RemoveUsersFromRoles (new string[] {username}, new string[] {roleName});
}
- public static void RemoveUserFromRoles (string username, string [] rolenames)
+ public static void RemoveUserFromRoles (string username, string [] roleNames)
{
- Provider.RemoveUsersFromRoles (new string[] {username}, rolenames);
+ Provider.RemoveUsersFromRoles (new string[] {username}, roleNames);
}
- public static void RemoveUsersFromRole (string [] usernames, string rolename)
+ public static void RemoveUsersFromRole (string [] usernames, string roleName)
{
- Provider.RemoveUsersFromRoles (usernames, new string[] {rolename});
+ Provider.RemoveUsersFromRoles (usernames, new string[] {roleName});
}
- public static void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
+ public static void RemoveUsersFromRoles (string [] usernames, string [] roleNames)
{
- Provider.RemoveUsersFromRoles (usernames, rolenames);
+ Provider.RemoveUsersFromRoles (usernames, roleNames);
}
- public static bool RoleExists (string rolename)
+ public static bool RoleExists (string roleName)
{
- return Provider.RoleExists (rolename);
+ return Provider.RoleExists (roleName);
}
- public static string[] FindUsersInRole (string rolename, string usernameToMatch)
+ public static string[] FindUsersInRole (string roleName, string usernameToMatch)
{
- return Provider.FindUsersInRole (rolename, usernameToMatch);
+ return Provider.FindUsersInRole (roleName, usernameToMatch);
}
public static string ApplicationName {
throw new ArgumentException (String.Format ("invalid format for {0}", pName));
}
- public override bool ChangePassword (string username, string oldPwd, string newPwd)
+ public override bool ChangePassword (string username, string oldPassword, string newPassword)
{
if (username != null) username = username.Trim ();
- if (oldPwd != null) oldPwd = oldPwd.Trim ();
- if (newPwd != null) newPwd = newPwd.Trim ();
+ if (oldPassword != null) oldPassword = oldPassword.Trim ();
+ if (newPassword != null) newPassword = newPassword.Trim ();
CheckParam ("username", username, 256);
- CheckParam ("oldPwd", oldPwd, 128);
- CheckParam ("newPwd", newPwd, 128);
+ CheckParam ("oldPassword", oldPassword, 128);
+ CheckParam ("newPassword", newPassword, 128);
- if (!CheckPassword (newPwd))
+ if (!CheckPassword (newPassword))
throw new ArgumentException (string.Format (
"New Password invalid. New Password length minimum: {0}. Non-alphanumeric characters required: {1}.",
MinRequiredPasswordLength,
MinRequiredNonAlphanumericCharacters));
using (DbConnection connection = CreateConnection ()) {
- PasswordInfo pi = ValidateUsingPassword (username, oldPwd);
+ PasswordInfo pi = ValidateUsingPassword (username, oldPassword);
if (pi != null) {
- EmitValidatingPassword (username, newPwd, false);
- string db_password = EncodePassword (newPwd, pi.PasswordFormat, pi.PasswordSalt);
+ EmitValidatingPassword (username, newPassword, false);
+ string db_password = EncodePassword (newPassword, pi.PasswordFormat, pi.PasswordSalt);
DbCommand command = factory.CreateCommand ();
command.Connection = connection;
}
}
- public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
+ public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPasswordQuestion, string newPasswordAnswer)
{
if (username != null) username = username.Trim ();
- if (newPwdQuestion != null) newPwdQuestion = newPwdQuestion.Trim ();
- if (newPwdAnswer != null) newPwdAnswer = newPwdAnswer.Trim ();
+ if (newPasswordQuestion != null) newPasswordQuestion = newPasswordQuestion.Trim ();
+ if (newPasswordAnswer != null) newPasswordAnswer = newPasswordAnswer.Trim ();
CheckParam ("username", username, 256);
if (RequiresQuestionAndAnswer)
- CheckParam ("newPwdQuestion", newPwdQuestion, 128);
+ CheckParam ("newPasswordQuestion", newPasswordQuestion, 128);
if (RequiresQuestionAndAnswer)
- CheckParam ("newPwdAnswer", newPwdAnswer, 128);
+ CheckParam ("newPasswordAnswer", newPasswordAnswer, 128);
using (DbConnection connection = CreateConnection ()) {
PasswordInfo pi = ValidateUsingPassword (username, password);
if (pi != null) {
- string db_passwordAnswer = EncodePassword (newPwdAnswer, pi.PasswordFormat, pi.PasswordSalt);
+ string db_passwordAnswer = EncodePassword (newPasswordAnswer, pi.PasswordFormat, pi.PasswordSalt);
DbCommand command = factory.CreateCommand ();
command.Connection = connection;
AddParameter (command, "@ApplicationName", ApplicationName);
AddParameter (command, "@UserName", username);
- AddParameter (command, "@NewPasswordQuestion", newPwdQuestion);
+ AddParameter (command, "@NewPasswordQuestion", newPasswordQuestion);
AddParameter (command, "@NewPasswordAnswer", db_passwordAnswer);
DbParameter returnValue = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
public override MembershipUser CreateUser (string username,
string password,
string email,
- string pwdQuestion,
- string pwdAnswer,
+ string passwordQuestion,
+ string passwordAnswer,
bool isApproved,
object providerUserKey,
out MembershipCreateStatus status)
if (username != null) username = username.Trim ();
if (password != null) password = password.Trim ();
if (email != null) email = email.Trim ();
- if (pwdQuestion != null) pwdQuestion = pwdQuestion.Trim ();
- if (pwdAnswer != null) pwdAnswer = pwdAnswer.Trim ();
+ if (passwordQuestion != null) passwordQuestion = passwordQuestion.Trim ();
+ if (passwordAnswer != null) passwordAnswer = passwordAnswer.Trim ();
/* some initial validation */
if (username == null || username.Length == 0 || username.Length > 256 || username.IndexOf (',') != -1) {
return null;
}
if (RequiresQuestionAndAnswer &&
- (pwdQuestion == null ||
- pwdQuestion.Length == 0 || pwdQuestion.Length > 256)) {
+ (passwordQuestion == null ||
+ passwordQuestion.Length == 0 || passwordQuestion.Length > 256)) {
status = MembershipCreateStatus.InvalidQuestion;
return null;
}
if (RequiresQuestionAndAnswer &&
- (pwdAnswer == null ||
- pwdAnswer.Length == 0 || pwdAnswer.Length > 128)) {
+ (passwordAnswer == null ||
+ passwordAnswer.Length == 0 || passwordAnswer.Length > 128)) {
status = MembershipCreateStatus.InvalidAnswer;
return null;
}
password = EncodePassword (password, PasswordFormat, passwordSalt);
if (RequiresQuestionAndAnswer)
- pwdAnswer = EncodePassword (pwdAnswer, PasswordFormat, passwordSalt);
+ passwordAnswer = EncodePassword (passwordAnswer, PasswordFormat, passwordSalt);
/* make sure the hashed/encrypted password and
* answer are still under 128 characters. */
}
if (RequiresQuestionAndAnswer) {
- if (pwdAnswer.Length > 128) {
+ if (passwordAnswer.Length > 128) {
status = MembershipCreateStatus.InvalidAnswer;
return null;
}
AddParameter (command, "@Password", password);
AddParameter (command, "@PasswordSalt", passwordSalt);
AddParameter (command, "@Email", email);
- AddParameter (command, "@PasswordQuestion", pwdQuestion);
- AddParameter (command, "@PasswordAnswer", pwdAnswer);
+ AddParameter (command, "@PasswordQuestion", passwordQuestion);
+ AddParameter (command, "@PasswordAnswer", passwordAnswer);
AddParameter (command, "@IsApproved", isApproved);
AddParameter (command, "@CurrentTimeUtc", Now);
AddParameter (command, "@CreateDate", Now);
}
}
- public override MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
+ public override MembershipUserCollection FindUsersByName (string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
{
- CheckParam ("nameToMatch", nameToMatch, 256);
+ CheckParam ("usernameToMatch", usernameToMatch, 256);
if (pageIndex < 0)
throw new ArgumentException ("pageIndex must be >= 0");
AddParameter (command, "@PageIndex", pageIndex);
AddParameter (command, "@PageSize", pageSize);
- AddParameter (command, "@UserNameToMatch", nameToMatch);
+ AddParameter (command, "@UserNameToMatch", usernameToMatch);
AddParameter (command, "@ApplicationName", ApplicationName);
// return value
AddParameter (command, "@ReturnValue", ParameterDirection.ReturnValue, null);
}
}
- public override string GetPassword (string username, string answer)
+ public override string GetPassword (string username, string passwordAnswer)
{
if (!EnablePasswordRetrieval)
throw new NotSupportedException ("this provider has not been configured to allow the retrieval of passwords");
CheckParam ("username", username, 256);
if (RequiresQuestionAndAnswer)
- CheckParam ("answer", answer, 128);
+ CheckParam ("passwordAnswer", passwordAnswer, 128);
PasswordInfo pi = GetPasswordInfo (username);
if (pi == null)
throw new ProviderException ("An error occurred while retrieving the password from the database");
- string user_answer = EncodePassword (answer, pi.PasswordFormat, pi.PasswordSalt);
+ string user_answer = EncodePassword (passwordAnswer, pi.PasswordFormat, pi.PasswordSalt);
string password = null;
using (DbConnection connection = CreateConnection ()) {
ProvidersHelper.GetDbProviderFactory (connectionString.ProviderName);
}
- public override string ResetPassword (string username, string answer)
+ public override string ResetPassword (string username, string passwordAnswer)
{
if (!EnablePasswordReset)
throw new NotSupportedException ("this provider has not been configured to allow the resetting of passwords");
CheckParam ("username", username, 256);
if (RequiresQuestionAndAnswer)
- CheckParam ("answer", answer, 128);
+ CheckParam ("passwordAnswer", passwordAnswer, 128);
using (DbConnection connection = CreateConnection ()) {
EmitValidatingPassword (username, newPassword, false);
string db_password = EncodePassword (newPassword, pi.PasswordFormat, pi.PasswordSalt);
- string db_answer = EncodePassword (answer, pi.PasswordFormat, pi.PasswordSalt);
+ string db_answer = EncodePassword (passwordAnswer, pi.PasswordFormat, pi.PasswordSalt);
DbCommand command = factory.CreateCommand ();
command.Connection = connection;
return dbp;
}
- public override void AddUsersToRoles (string [] usernames, string [] rolenames)
+ public override void AddUsersToRoles (string [] usernames, string [] roleNames)
{
Hashtable h = new Hashtable ();
}
h = new Hashtable ();
- foreach (string r in rolenames) {
+ foreach (string r in roleNames) {
if (r == null)
throw new ArgumentNullException ("null element in rolenames array");
if (h.ContainsKey (r))
command.Connection = connection;
command.CommandType = CommandType.StoredProcedure;
- AddParameter (command, "@RoleNames", String.Join (",", rolenames));
+ AddParameter (command, "@RoleNames", String.Join (",", roleNames));
AddParameter (command, "@UserNames", String.Join (",", usernames));
AddParameter (command, "@ApplicationName", ApplicationName);
AddParameter (command, "@CurrentTimeUtc", DateTime.UtcNow);
}
}
- public override void CreateRole (string rolename)
+ public override void CreateRole (string roleName)
{
- if (rolename == null)
- throw new ArgumentNullException ("rolename");
+ if (roleName == null)
+ throw new ArgumentNullException ("roleName");
- if (rolename.Length == 0 || rolename.Length > 256 || rolename.IndexOf (',') != -1)
+ if (roleName.Length == 0 || roleName.Length > 256 || roleName.IndexOf (',') != -1)
throw new ArgumentException ("rolename is in invalid format");
using (DbConnection connection = CreateConnection ()) {
command.CommandType = CommandType.StoredProcedure;
AddParameter (command, "@ApplicationName", ApplicationName);
- AddParameter (command, "@RoleName", rolename);
+ AddParameter (command, "@RoleName", roleName);
DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
command.ExecuteNonQuery ();
int returnValue = (int) dbpr.Value;
if (returnValue == 1)
- throw new ProviderException (rolename + " already exists in the database");
+ throw new ProviderException (roleName + " already exists in the database");
else
return;
}
}
- public override bool DeleteRole (string rolename, bool throwOnPopulatedRole)
+ public override bool DeleteRole (string roleName, bool throwOnPopulatedRole)
{
- if (rolename == null)
- throw new ArgumentNullException ("rolename");
+ if (roleName == null)
+ throw new ArgumentNullException ("roleName");
- if (rolename.Length == 0 || rolename.Length > 256 || rolename.IndexOf (',') != -1)
+ if (roleName.Length == 0 || roleName.Length > 256 || roleName.IndexOf (',') != -1)
throw new ArgumentException ("rolename is in invalid format");
using (DbConnection connection = CreateConnection ()) {
command.Connection = connection;
command.CommandType = CommandType.StoredProcedure;
AddParameter (command, "@ApplicationName", ApplicationName);
- AddParameter (command, "@RoleName", rolename);
+ AddParameter (command, "@RoleName", roleName);
AddParameter (command, "@DeleteOnlyIfRoleIsEmpty", throwOnPopulatedRole);
DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
if (returnValue == 1)
return false; //role does not exist
else if (returnValue == 2 && throwOnPopulatedRole)
- throw new ProviderException (rolename + " is not empty");
+ throw new ProviderException (roleName + " is not empty");
else
return false;
}
}
}
- public override string [] GetUsersInRole (string rolename)
+ public override string [] GetUsersInRole (string roleName)
{
using (DbConnection connection = CreateConnection ()) {
DbCommand command = factory.CreateCommand ();
command.Connection = connection;
command.CommandType = CommandType.StoredProcedure;
- AddParameter (command, "@RoleName", rolename);
+ AddParameter (command, "@RoleName", roleName);
AddParameter (command, "@ApplicationName", ApplicationName);
DbDataReader reader = command.ExecuteReader ();
ProvidersHelper.GetDbProviderFactory (connectionString.ProviderName);
}
- public override bool IsUserInRole (string username, string rolename)
+ public override bool IsUserInRole (string username, string roleName)
{
using (DbConnection connection = CreateConnection ()) {
DbCommand command = factory.CreateCommand ();
command.Connection = connection;
command.CommandType = CommandType.StoredProcedure;
- AddParameter (command, "@RoleName", rolename);
+ AddParameter (command, "@RoleName", roleName);
AddParameter (command, "@UserName", username);
AddParameter (command, "@ApplicationName", ApplicationName);
DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
}
}
- public override void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
+ public override void RemoveUsersFromRoles (string [] usernames, string [] roleNames)
{
Hashtable h = new Hashtable ();
}
h = new Hashtable ();
- foreach (string r in rolenames) {
+ foreach (string r in roleNames) {
if (r == null)
throw new ArgumentNullException ("null element in rolenames array");
if (h.ContainsKey (r))
command.CommandType = CommandType.StoredProcedure;
AddParameter (command, "@UserNames", String.Join (",", usernames));
- AddParameter (command, "@RoleNames", String.Join (",", rolenames));
+ AddParameter (command, "@RoleNames", String.Join (",", roleNames));
AddParameter (command, "@ApplicationName", ApplicationName);
DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
}
}
- public override bool RoleExists (string rolename)
+ public override bool RoleExists (string roleName)
{
using (DbConnection connection = CreateConnection ()) {
command.CommandType = CommandType.StoredProcedure;
AddParameter (command, "@ApplicationName", ApplicationName);
- AddParameter (command, "@RoleName", rolename);
+ AddParameter (command, "@RoleName", roleName);
DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
command.ExecuteNonQuery ();
get { return container.IsSynchronized; }
}
- public object this [string key] {
- get { return container [key]; }
- set { container [key] = value; }
+ public object this [string name] {
+ get { return container [name]; }
+ set { container [name] = value; }
}
public object this [int index] {
{
///methods
void Abandon ();
- void Add (string itemName, object itemValue);
+ void Add (string name, object value);
void Clear ();
- void CopyTo (Array sessionValues, int index);
+ void CopyTo (Array array, int index);
IEnumerator GetEnumerator ();
- void Remove (string itemName);
+ void Remove (string name);
void RemoveAll ();
void RemoveAt (int index);
void Initialize ();
bool InitializeRequest (HttpContext context, bool suppressAutoDetectRedirect, out bool supportSessionIDReissue);
void RemoveSessionID (HttpContext context);
- void SaveSessionID (HttpContext context, string sessionID, out bool isRedirected, out bool isCookieAdded);
+ void SaveSessionID (HttpContext context, string id, out bool redirected, out bool cookieAdded);
bool Validate (string id);
}
}
{
///methods
void Clear ();
- void Remove (string itemName);
+ void Remove (string name);
void RemoveAt (int index);
///properties
HttpStaticObjectsCollection staticObjects;
int timeout;
- public SessionStateStoreData (ISessionStateItemCollection items,
- HttpStaticObjectsCollection objects,
+ public SessionStateStoreData (ISessionStateItemCollection sessionItems,
+ HttpStaticObjectsCollection staticObjects,
int timeout)
{
- sessionItems = items;
- staticObjects = objects;
+ this.sessionItems = sessionItems;
+ this.staticObjects = staticObjects;
this.timeout = timeout;
}
}
}
- protected internal virtual void BeginRender (HtmlTextWriter w)
+ protected internal virtual void BeginRender (HtmlTextWriter writer)
{
- w.BeginRender();
+ writer.BeginRender();
}
protected internal virtual void CreateChildControls ()
control.CreateChildControls ();
}
- protected internal virtual void EndRender (HtmlTextWriter w)
+ protected internal virtual void EndRender (HtmlTextWriter writer)
{
- w.EndRender ();
+ writer.EndRender ();
}
protected internal virtual void LoadAdapterControlState (object state)
control.OnUnload(e);
}
- protected internal virtual void Render (HtmlTextWriter w)
+ protected internal virtual void Render (HtmlTextWriter writer)
{
Control control = Control;
if (control != null)
- control.Render (w);
+ control.Render (writer);
}
- protected internal virtual void RenderChildren (HtmlTextWriter w)
+ protected internal virtual void RenderChildren (HtmlTextWriter writer)
{
Control control = Control;
if (control != null)
- control.RenderChildren (w);
+ control.RenderChildren (writer);
}
protected internal virtual object SaveAdapterControlState ()
radioButtons.Add(radioButton);
}
- public virtual void RenderBeginHyperlink (HtmlTextWriter w,
+ public virtual void RenderBeginHyperlink (HtmlTextWriter writer,
string targetUrl,
bool encodeUrl,
- string softKeyLabel)
+ string softkeyLabel)
{
- InternalRenderBeginHyperlink (w, targetUrl, encodeUrl, softKeyLabel, null);
+ InternalRenderBeginHyperlink (writer, targetUrl, encodeUrl, softkeyLabel, null);
}
- public virtual void RenderBeginHyperlink (HtmlTextWriter w,
+ public virtual void RenderBeginHyperlink (HtmlTextWriter writer,
string targetUrl,
bool encodeUrl,
- string softKeyLabel,
+ string softkeyLabel,
string accessKey)
{
if (accessKey != null && accessKey.Length > 1)
throw new ArgumentOutOfRangeException("accessKey");
- InternalRenderBeginHyperlink (w, targetUrl, encodeUrl, softKeyLabel, accessKey);
+ InternalRenderBeginHyperlink (writer, targetUrl, encodeUrl, softkeyLabel, accessKey);
}
void InternalRenderBeginHyperlink (HtmlTextWriter w,
}
- public virtual void RenderEndHyperlink (HtmlTextWriter w)
+ public virtual void RenderEndHyperlink (HtmlTextWriter writer)
{
- w.RenderEndTag();
+ writer.RenderEndTag();
}
- public virtual void RenderPostBackEvent (HtmlTextWriter w,
+ public virtual void RenderPostBackEvent (HtmlTextWriter writer,
string target,
string argument,
- string softKeyLabel,
+ string softkeyLabel,
string text)
{
- RenderPostBackEvent (w, target, argument, softKeyLabel, text, Page.Request.FilePath, null, true);
+ RenderPostBackEvent (writer, target, argument, softkeyLabel, text, Page.Request.FilePath, null, true);
}
- public virtual void RenderPostBackEvent (HtmlTextWriter w,
+ public virtual void RenderPostBackEvent (HtmlTextWriter writer,
string target,
string argument,
- string softKeyLabel,
+ string softkeyLabel,
string text,
string postUrl,
string accessKey)
{
- RenderPostBackEvent (w, target, argument, softKeyLabel, text, postUrl, accessKey, true);
+ RenderPostBackEvent (writer, target, argument, softkeyLabel, text, postUrl, accessKey, true);
}
- protected void RenderPostBackEvent (HtmlTextWriter w,
+ protected void RenderPostBackEvent (HtmlTextWriter writer,
string target,
string argument,
- string softKeyLabel,
+ string softkeyLabel,
string text,
string postUrl,
string accessKey,
{
string url = String.Format ("{0}?__VIEWSTATE={1}&__EVENTTARGET={2}&__EVENTARGUMENT={3}&__PREVIOUSPAGE={4}",
postUrl, HttpUtility.UrlEncode (Page.GetSavedViewState ()), target, argument, Page.Request.FilePath);
- RenderBeginHyperlink (w, url, encode, softKeyLabel, accessKey);
- w.Write(text);
- RenderEndHyperlink(w);
+ RenderBeginHyperlink (writer, url, encode, softkeyLabel, accessKey);
+ writer.Write(text);
+ RenderEndHyperlink(writer);
}
public virtual string TransformText (string text)
return text;
}
- protected internal virtual string GetPostBackFormReference (string formID)
+ protected internal virtual string GetPostBackFormReference (string formId)
{
- return String.Format("document.forms['{0}']", formID);
+ return String.Format("document.forms['{0}']", formId);
}
ListDictionary radio_button_group;
base.OnPreRender(e);
}
- protected override void RenderAttributes (HtmlTextWriter w)
+ protected override void RenderAttributes (HtmlTextWriter writer)
{
/* Need to always render: method, action and id
*/
if (RenderingCompatibilityLessThan40)
// LAMESPEC: MSDN says the 'name' attribute is rendered only in
// Legacy mode, this is not true.
- w.WriteAttribute ("name", Name);
+ writer.WriteAttribute ("name", Name);
}
- w.WriteAttribute ("method", Method);
+ writer.WriteAttribute ("method", Method);
if (String.IsNullOrEmpty (customAction))
- w.WriteAttribute ("action", action, true);
+ writer.WriteAttribute ("action", action, true);
/*
* This is a hack that guarantees the ID is set properly for HtmlControl to
string submit = page != null ? page.GetSubmitStatements () : null;
if (!String.IsNullOrEmpty (submit)) {
Attributes.Remove ("onsubmit");
- w.WriteAttribute ("onsubmit", submit);
+ writer.WriteAttribute ("onsubmit", submit);
}
/* enctype and target should not be written if
*/
string enctype = Enctype;
if (!String.IsNullOrEmpty (enctype))
- w.WriteAttribute ("enctype", enctype);
+ writer.WriteAttribute ("enctype", enctype);
string target = Target;
if (!String.IsNullOrEmpty (target))
- w.WriteAttribute ("target", target);
+ writer.WriteAttribute ("target", target);
string defaultbutton = DefaultButton;
if (!String.IsNullOrEmpty (defaultbutton)) {
ID));
if (page != null && DetermineRenderUplevel ()) {
- w.WriteAttribute (
+ writer.WriteAttribute (
"onkeypress",
"javascript:return " + page.WebFormScriptReference + ".WebForm_FireDefaultButton(event, '" + c.ClientID + "')");
}
Attributes.Remove ("enctype");
Attributes.Remove ("target");
- base.RenderAttributes (w);
+ base.RenderAttributes (writer);
}
- protected internal override void RenderChildren (HtmlTextWriter w)
+ protected internal override void RenderChildren (HtmlTextWriter writer)
{
Page page = Page;
page.RegisterForm (this);
}
if (page != null)
- page.OnFormRender (w, ClientID);
- base.RenderChildren (w);
+ page.OnFormRender (writer, ClientID);
+ base.RenderChildren (writer);
if (page != null)
- page.OnFormPostRender (w, ClientID);
+ page.OnFormPostRender (writer, ClientID);
}
/* According to corcompare */
[MonoTODO ("why override?")]
- public override void RenderControl (HtmlTextWriter w)
+ public override void RenderControl (HtmlTextWriter writer)
{
- base.RenderControl (w);
+ base.RenderControl (writer);
}
- protected internal override void Render (HtmlTextWriter w)
+ protected internal override void Render (HtmlTextWriter output)
{
- base.Render (w);
+ base.Render (output);
}
}
}
}
}
- protected override void RenderAttributes (HtmlTextWriter w)
+ protected override void RenderAttributes (HtmlTextWriter writer)
{
- PreProcessRelativeReference (w, "src");
+ PreProcessRelativeReference (writer, "src");
/* MS does not seem to render the src attribute if it
* is empty. Firefox, at least, will fetch the current
if (src == null || src.Length == 0)
Attributes.Remove ("src");
- base.RenderAttributes (w);
+ base.RenderAttributes (writer);
/* MS closes the HTML element at the end of
* the attributes too, according to the nunit
* tests
*/
- w.Write (" /");
+ writer.Write (" /");
}
}
}
}
}
- protected override void RenderAttributes (HtmlTextWriter w)
+ protected override void RenderAttributes (HtmlTextWriter writer)
{
Page page = Page;
if (page != null)
/* If there is no "name" attribute,
* LoadPostData doesn't work...
*/
- w.WriteAttribute ("name", Name);
+ writer.WriteAttribute ("name", Name);
Attributes.Remove ("name");
/* Don't render the databinding attributes */
Attributes.Remove ("datatextfield");
Attributes.Remove ("datavaluefield");
- base.RenderAttributes (w);
+ base.RenderAttributes (writer);
}
- protected internal override void RenderChildren (HtmlTextWriter w)
+ protected internal override void RenderChildren (HtmlTextWriter writer)
{
- base.RenderChildren (w);
+ base.RenderChildren (writer);
if (items == null)
return;
- w.WriteLine ();
+ writer.WriteLine ();
bool done_sel = false;
int count = items.Count;
for (int i = 0; i < count; i++) {
ListItem item = items[i];
- w.Indent++;
+ writer.Indent++;
/* Write the <option> elements this
* way so that the output HTML matches
* element, cos that breaks other
* stuff.)
*/
- w.WriteBeginTag ("option");
+ writer.WriteBeginTag ("option");
if (item.Selected && !done_sel) {
- w.WriteAttribute ("selected", "selected");
+ writer.WriteAttribute ("selected", "selected");
if (!Multiple) {
done_sel = true;
}
}
- w.WriteAttribute ("value", item.Value, true);
+ writer.WriteAttribute ("value", item.Value, true);
if (item.HasAttributes) {
AttributeCollection attrs = item.Attributes;
foreach (string key in attrs.Keys)
- w.WriteAttribute (key, HttpUtility.HtmlAttributeEncode (attrs [key]));
+ writer.WriteAttribute (key, HttpUtility.HtmlAttributeEncode (attrs [key]));
}
- w.Write (HtmlTextWriter.TagRightChar);
+ writer.Write (HtmlTextWriter.TagRightChar);
- w.Write (HttpUtility.HtmlEncode(item.Text));
- w.WriteEndTag ("option");
- w.WriteLine ();
+ writer.Write (HttpUtility.HtmlEncode(item.Text));
+ writer.WriteEndTag ("option");
+ writer.WriteLine ();
- w.Indent--;
+ writer.Indent--;
}
}
InnerList.AddRange (connectionInterfaces);
}
- public bool Contains (Type t)
+ public bool Contains (Type value)
{
- return InnerList.Contains (t);
+ return InnerList.Contains (value);
}
public void CopyTo (Type[] array,
InnerList.CopyTo (array, index);
}
- public int IndexOf (Type t)
+ public int IndexOf (Type value)
{
- return InnerList.IndexOf (t);
+ return InnerList.IndexOf (value);
}
public Type this [ int index ] {
{
public class ConsumerConnectionPoint : ConnectionPoint
{
- public ConsumerConnectionPoint (MethodInfo callBack, Type interFace,
- Type control, string name, string id,
- bool allowsMultiConnections) : base (callBack, interFace,
- control, name, id, allowsMultiConnections)
+ public ConsumerConnectionPoint (MethodInfo callbackMethod, Type interfaceType,
+ Type controlType, string displayName, string id,
+ bool allowsMultipleConnections) : base (callbackMethod, interfaceType,
+ controlType, displayName, id, allowsMultipleConnections)
{
}
{
public class ProviderConnectionPoint : ConnectionPoint
{
- public ProviderConnectionPoint (MethodInfo callBack, Type interFace,
- Type control, string name, string id,
- bool allowsMultiConnections) : base (callBack, interFace,
- control, name, id, allowsMultiConnections)
+ public ProviderConnectionPoint (MethodInfo callbackMethod, Type interfaceType,
+ Type controlType, string displayName, string id,
+ bool allowsMultipleConnections) : base (callbackMethod, interfaceType,
+ controlType, displayName, id, allowsMultipleConnections)
{
}
get { return id;}
}
- public WebPartVerb (string id, string clientHandler) {
+ public WebPartVerb (string id, string clientClickHandler) {
this.id = id;
- this.clientClickHandler = clientHandler;
+ this.clientClickHandler = clientClickHandler;
stateBag = new StateBag ();
- stateBag.Add ("clientClickHandler", clientHandler);
+ stateBag.Add ("clientClickHandler", clientClickHandler);
}
base.OnInit(e);
}
- protected internal override void OnPreRender (EventArgs eee)
+ protected internal override void OnPreRender (EventArgs e)
{
Hashtable ht = null;
ht = ChooseAd ();
}
- AdCreatedEventArgs e = new AdCreatedEventArgs (ht);
- OnAdCreated (e);
- createdargs = e;
+ AdCreatedEventArgs ev = new AdCreatedEventArgs (ht);
+ OnAdCreated (ev);
+ createdargs = ev;
}
throw new NotImplementedException ();
}
- protected internal override void Render (HtmlTextWriter w)
+ protected internal override void Render (HtmlTextWriter writer)
{
AdCreatedEventArgs e = createdargs;
- base.AddAttributesToRender (w);
+ base.AddAttributesToRender (writer);
if (e.NavigateUrl != null && e.NavigateUrl.Length > 0)
- w.AddAttribute (HtmlTextWriterAttribute.Href, ResolveAdUrl (e.NavigateUrl));
+ writer.AddAttribute (HtmlTextWriterAttribute.Href, ResolveAdUrl (e.NavigateUrl));
if (Target != null && Target.Length > 0)
- w.AddAttribute (HtmlTextWriterAttribute.Target, Target);
+ writer.AddAttribute (HtmlTextWriterAttribute.Target, Target);
- w.RenderBeginTag (HtmlTextWriterTag.A);
+ writer.RenderBeginTag (HtmlTextWriterTag.A);
if (e.ImageUrl != null && e.ImageUrl.Length > 0)
- w.AddAttribute (HtmlTextWriterAttribute.Src, ResolveAdUrl (e.ImageUrl));
+ writer.AddAttribute (HtmlTextWriterAttribute.Src, ResolveAdUrl (e.ImageUrl));
- w.AddAttribute (HtmlTextWriterAttribute.Alt, e.AlternateText == null ? String.Empty : e.AlternateText);
- w.AddAttribute (HtmlTextWriterAttribute.Border, "0", false);
- w.RenderBeginTag (HtmlTextWriterTag.Img);
- w.RenderEndTag (); // img
- w.RenderEndTag (); // a
+ writer.AddAttribute (HtmlTextWriterAttribute.Alt, e.AlternateText == null ? String.Empty : e.AlternateText);
+ writer.AddAttribute (HtmlTextWriterAttribute.Border, "0", false);
+ writer.RenderBeginTag (HtmlTextWriterTag.Img);
+ writer.RenderEndTag (); // img
+ writer.RenderEndTag (); // a
}
string ResolveAdUrl (string url)
{
}
- protected override void AddAttributesToRender (HtmlTextWriter w)
+ protected override void AddAttributesToRender (HtmlTextWriter writer)
{
if (RenderUplevel) {
if (Page != null) {
}
}
- base.AddAttributesToRender (w);
+ base.AddAttributesToRender (writer);
}
public static bool CanConvert (string text,
return BaseCompareValidator.Convert(text, type, false, out value);
}
- protected static bool Compare (string left, string right, ValidationCompareOperator op, ValidationDataType type)
+ protected static bool Compare (string leftText, string rightText, ValidationCompareOperator op, ValidationDataType type)
{
- return BaseCompareValidator.Compare(left, false, right, false, op, type);
+ return BaseCompareValidator.Compare(leftText, false, rightText, false, op, type);
}
protected override bool DetermineRenderUplevel ()
return order.ToString ();
}
- protected static int GetFullYear (int two_digit_year)
+ protected static int GetFullYear (int shortYear)
{
/* This is an implementation that matches the
* docs on msdn, but MS doesn't seem to go by
int cutoff = CutoffYear;
int twodigitcutoff = cutoff % 100;
- if (two_digit_year <= twodigitcutoff)
- return cutoff - twodigitcutoff + two_digit_year;
+ if (shortYear <= twodigitcutoff)
+ return cutoff - twodigitcutoff + shortYear;
else
- return cutoff - twodigitcutoff - 100 + two_digit_year;
+ return cutoff - twodigitcutoff - 100 + shortYear;
}
[DefaultValue (false)]
return Convert(text, type, cultureInvariant, out value);
}
- protected static bool Compare (string left,
+ protected static bool Compare (string leftText,
bool cultureInvariantLeftText,
- string right,
+ string rightText,
bool cultureInvariantRightText,
ValidationCompareOperator op,
ValidationDataType type)
{
object lo, ro;
- if (!Convert(left, type, cultureInvariantLeftText, out lo))
+ if (!Convert(leftText, type, cultureInvariantLeftText, out lo))
return false;
/* DataTypeCheck is a unary operator that only
/* pretty crackladen, but if we're unable to
* convert the rhs to @type, the comparison
* succeeds */
- if (!Convert(right, type, cultureInvariantRightText, out ro))
+ if (!Convert(rightText, type, cultureInvariantRightText, out ro))
return true;
int comp = ((IComparable)lo).CompareTo((IComparable)ro);
return o.ToString ();
}
- public static PropertyDescriptor GetValidationProperty (object o)
+ public static PropertyDescriptor GetValidationProperty (object component)
{
PropertyDescriptorCollection props;
System.ComponentModel.AttributeCollection col;
- props = TypeDescriptor.GetProperties (o);
- col = TypeDescriptor.GetAttributes (o);
+ props = TypeDescriptor.GetProperties (component);
+ col = TypeDescriptor.GetAttributes (component);
foreach (Attribute at in col) {
ValidationPropertyAttribute vpa = at as ValidationPropertyAttribute;
get { return true; }
}
- protected virtual string FormatDataValue (object value, bool encode)
+ protected virtual string FormatDataValue (object dataValue, bool encode)
{
string res;
bool htmlEncodeFormatString = HtmlEncodeFormatString;
- string stringValue = (value != null) ? value.ToString () : String.Empty;
- if (value == null || (stringValue.Length == 0 && ConvertEmptyStringToNull)) {
+ string stringValue = (dataValue != null) ? dataValue.ToString () : String.Empty;
+ if (dataValue == null || (stringValue.Length == 0 && ConvertEmptyStringToNull)) {
if (NullDisplayText.Length == 0) {
encode = false;
res = " ";
string format = DataFormatString;
if (!String.IsNullOrEmpty (format)) {
if (!encode || htmlEncodeFormatString)
- res = String.Format (format, value);
+ res = String.Format (format, dataValue);
else
res = String.Format (format, encode ? HttpUtility.HtmlEncode (stringValue) : stringValue);
} else
return base.Initialize (sortingEnabled, control);
}
- protected virtual string FormatDataTextValue (object value)
+ protected virtual string FormatDataTextValue (object dataTextValue)
{
if (DataTextFormatString.Length > 0)
- return String.Format (DataTextFormatString, value);
- else if (value == null)
+ return String.Format (DataTextFormatString, dataTextValue);
+ else if (dataTextValue == null)
return String.Empty;
else
- return value.ToString ();
+ return dataTextValue.ToString ();
}
public override void InitializeCell (DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
RaisePostBackEvent (eventArgument);
}
- protected virtual void RaisePostBackEvent (string arg)
+ protected virtual void RaisePostBackEvent (string eventArgument)
{
- ValidateEvent (UniqueID, arg);
- if (arg.Length < 1)
+ ValidateEvent (UniqueID, eventArgument);
+ if (eventArgument.Length < 1)
return;
- if (arg[0] == 'V') { // Goes to Next or Previous month
+ if (eventArgument[0] == 'V') { // Goes to Next or Previous month
DateTime prev = VisibleDate;
- int days = Int32.Parse (arg.Substring (1));
+ int days = Int32.Parse (eventArgument.Substring (1));
DateTime dt = GetGlobalCalendar().AddDays (dateZenith, days);
VisibleDate = dt;
OnVisibleMonthChanged (VisibleDate, prev);
return;
}
- if (arg[0] == 'R') { // Selects a range of dates
+ if (eventArgument[0] == 'R') { // Selects a range of dates
string num, date, days;
- num = arg.Substring (1);
+ num = eventArgument.Substring (1);
days = num.Substring (num.Length - 2, 2);
date = num.Substring (0, num.Length - 2);
DateTime d = GetGlobalCalendar().AddDays (dateZenith, Int32.Parse (date));
}
// Selects a single day
- int daysFromZenith = Int32.Parse (arg);
+ int daysFromZenith = Int32.Parse (eventArgument);
DateTime day = GetGlobalCalendar().AddDays (dateZenith, daysFromZenith);
SelectedDates.SelectRange (day, day);
OnSelectionChanged ();
return false;
}
- protected internal override void Render (HtmlTextWriter w)
+ protected internal override void Render (HtmlTextWriter writer)
{
Page page = Page;
if (page != null) {
if (!RenderingCompatibilityLessThan40)
ControlStyle.PrependCssClass (DisabledCssClass);
else
- w.AddAttribute (HtmlTextWriterAttribute.Disabled, "disabled", false);
+ writer.AddAttribute (HtmlTextWriterAttribute.Disabled, "disabled", false);
need_span = true;
}
if (need_span) {
- AddDisplayStyleAttribute (w);
- ControlStyle.AddAttributesToRender (w, this);
+ AddDisplayStyleAttribute (writer);
+ ControlStyle.AddAttributesToRender (writer, this);
}
string tt = ToolTip;
if (tt != null && tt.Length > 0){
- w.AddAttribute ("title", tt);
+ writer.AddAttribute ("title", tt);
need_span = true;
}
- if (HasAttributes && AddAttributesForSpan (w))
+ if (HasAttributes && AddAttributesForSpan (writer))
need_span = true;
if (need_span)
- w.RenderBeginTag (HtmlTextWriterTag.Span);
+ writer.RenderBeginTag (HtmlTextWriterTag.Span);
TextAlign align = TextAlign;
if (align == TextAlign.Right) {
- RenderInput (w, enabled);
- RenderLabel (w);
+ RenderInput (writer, enabled);
+ RenderLabel (writer);
} else {
- RenderLabel (w);
- RenderInput (w, enabled);
+ RenderLabel (writer);
+ RenderInput (writer, enabled);
}
if (need_span)
- w.RenderEndTag ();
+ writer.RenderEndTag ();
}
void RenderInput (HtmlTextWriter w, bool enabled)
{
}
- protected override void AddAttributesToRender (HtmlTextWriter w)
+ protected override void AddAttributesToRender (HtmlTextWriter writer)
{
if (RenderUplevel) {
RegisterExpandoAttribute (ClientID, "evaluationfunction", "CompareValidatorEvaluateIsValid");
RegisterExpandoAttribute (ClientID, "operator", Operator.ToString ());
}
- base.AddAttributesToRender (w);
+ base.AddAttributesToRender (writer);
}
protected override bool ControlPropertiesValid ()
base.DataBind();
}
- protected internal override void Render (HtmlTextWriter w)
+ protected internal override void Render (HtmlTextWriter writer)
{
/* make sure all the child controls have been created */
EnsureChildControls ();
/* and then... */
- base.Render (w);
+ base.Render (writer);
}
void ICompositeControlDesignerAccessor.RecreateChildControls ()
return new ControlParameter (this);
}
protected internal
- override object Evaluate (HttpContext ctx, Control control)
+ override object Evaluate (HttpContext context, Control control)
{
if (control == null)
return null;
return new CookieParameter (this);
}
protected internal
- override object Evaluate (HttpContext ctx, Control control)
+ override object Evaluate (HttpContext context, Control control)
{
- if (ctx == null || ctx.Request == null)
+ if (context == null || context.Request == null)
return null;
- HttpCookie c = ctx.Request.Cookies [CookieName];
+ HttpCookie c = context.Request.Cookies [CookieName];
if (c == null)
return null;
{
DataControlField containerField;
- public DataControlFieldCell (DataControlField containerField) : this (HtmlTextWriterTag.Td, containerField)
+ public DataControlFieldCell (DataControlField containingField) : this (HtmlTextWriterTag.Td, containingField)
{
}
- protected DataControlFieldCell (HtmlTextWriterTag tagKey, DataControlField containerField) : base (tagKey)
+ protected DataControlFieldCell (HtmlTextWriterTag tagKey, DataControlField containingField) : base (tagKey)
{
- this.containerField = containerField;
+ this.containerField = containingField;
}
public DataControlField ContainingField {
}
[Browsable (false)]
- public DataControlField this [int i] {
- get { return (DataControlField) ((IList)this) [i]; }
+ public DataControlField this [int index] {
+ get { return (DataControlField) ((IList)this) [index]; }
}
protected override void OnInsertComplete (int index, object value)
{
TableHeaderScope scope;
- public DataControlFieldHeaderCell (DataControlField containerField): base (HtmlTextWriterTag.Th, containerField)
+ public DataControlFieldHeaderCell (DataControlField containingField): base (HtmlTextWriterTag.Th, containingField)
{
}
#endregion // IDataItemContainer Properties
#region Public Instance Methods
- protected override bool OnBubbleEvent(object source, EventArgs args)
+ protected override bool OnBubbleEvent(object source, EventArgs e)
{
// Nikhil Kothari, pg 312-313:
- if (args is CommandEventArgs) {
- RaiseBubbleEvent(this, new DataGridCommandEventArgs(this, source, (CommandEventArgs)args));
+ if (e is CommandEventArgs) {
+ RaiseBubbleEvent(this, new DataGridCommandEventArgs(this, source, (CommandEventArgs)e));
return true;
}
- return base.OnBubbleEvent (source, args);
+ return base.OnBubbleEvent (source, e);
}
protected internal virtual void SetItemType(ListItemType itemType)
return true;
}
- protected virtual void LoadViewState (object savedState)
+ protected virtual void LoadViewState (object state)
{
- if (savedState is Pair) {
- Pair p = (Pair) savedState;
+ if (state is Pair) {
+ Pair p = (Pair) state;
object[] akeys = (object[]) p.First;
object[] avals = (object[]) p.Second;
for (int n=0; n<akeys.Length; n++) {
keyTable [akeys[n]] = avals [n];
}
- } else if (savedState is object[]) {
- object[] avals = (object[]) savedState;
+ } else if (state is object[]) {
+ object[] avals = (object[]) state;
for (int n=0; n<avals.Length; n++)
keyTable [keyNames[n]] = avals [n];
}
return style;
}
- protected override int CreateChildControls (IEnumerable data, bool dataBinding)
+ protected override int CreateChildControls (IEnumerable dataSource, bool dataBinding)
{
- PagedDataSource dataSource = new PagedDataSource ();
- dataSource.DataSource = CurrentMode != DetailsViewMode.Insert ? data : null;
- dataSource.AllowPaging = AllowPaging;
- dataSource.PageSize = 1;
- dataSource.CurrentPageIndex = PageIndex;
+ PagedDataSource pagedDataSource = new PagedDataSource ();
+ pagedDataSource.DataSource = CurrentMode != DetailsViewMode.Insert ? dataSource : null;
+ pagedDataSource.AllowPaging = AllowPaging;
+ pagedDataSource.PageSize = 1;
+ pagedDataSource.CurrentPageIndex = PageIndex;
if (dataBinding && CurrentMode != DetailsViewMode.Insert) {
DataSourceView view = GetData ();
if (view != null && view.CanPage) {
- dataSource.AllowServerPaging = true;
+ pagedDataSource.AllowServerPaging = true;
if (SelectArguments.RetrieveTotalRowCount)
- dataSource.VirtualCount = SelectArguments.TotalRowCount;
+ pagedDataSource.VirtualCount = SelectArguments.TotalRowCount;
}
}
- bool showPager = AllowPaging && (dataSource.PageCount > 1);
+ bool showPager = AllowPaging && (pagedDataSource.PageCount > 1);
Controls.Clear ();
table = CreateTable ();
// Gets the current data item
if (AllowPaging) {
- PageCount = dataSource.DataSourceCount;
+ PageCount = pagedDataSource.DataSourceCount;
if (PageIndex >= PageCount && PageCount > 0)
- pageIndex = dataSource.CurrentPageIndex = PageCount - 1;
- if (dataSource.DataSource != null) {
- IEnumerator e = dataSource.GetEnumerator ();
+ pageIndex = pagedDataSource.CurrentPageIndex = PageCount - 1;
+ if (pagedDataSource.DataSource != null) {
+ IEnumerator e = pagedDataSource.GetEnumerator ();
if (e.MoveNext ())
dataItem = e.Current;
}
} else {
int page = 0;
object lastItem = null;
- if (dataSource.DataSource != null) {
- IEnumerator e = dataSource.GetEnumerator ();
+ if (pagedDataSource.DataSource != null) {
+ IEnumerator e = pagedDataSource.GetEnumerator ();
for (; e.MoveNext (); page++) {
lastItem = e.Current;
if (page == PageIndex)
if (showPager && PagerSettings.Position == PagerPosition.Top ||
PagerSettings.Position == PagerPosition.TopAndBottom) {
topPagerRow = CreateRow (-1, DataControlRowType.Pager, DataControlRowState.Normal);
- InitializePager (topPagerRow, dataSource);
+ InitializePager (topPagerRow, pagedDataSource);
table.Rows.Add (topPagerRow);
}
if (showPager && PagerSettings.Position == PagerPosition.Bottom ||
PagerSettings.Position == PagerPosition.TopAndBottom) {
bottomPagerRow = CreateRow (-1, DataControlRowType.Pager, DataControlRowState.Normal);
- InitializePager (bottomPagerRow, dataSource);
+ InitializePager (bottomPagerRow, pagedDataSource);
table.Rows.Add (bottomPagerRow);
}
}
return rstate;
}
- protected virtual void InitializePager (DetailsViewRow row, PagedDataSource dataSource)
+ protected virtual void InitializePager (DetailsViewRow row, PagedDataSource pagedDataSource)
{
TableCell cell = new TableCell ();
cell.ColumnSpan = 2;
if (pagerTemplate != null)
pagerTemplate.InstantiateIn (cell);
else
- cell.Controls.Add (PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, dataSource.PageCount));
+ cell.Controls.Add (PagerSettings.CreatePagerControl (pagedDataSource.CurrentPageIndex, pagedDataSource.PageCount));
row.Cells.Add (cell);
}
return dic;
}
- protected virtual void ExtractRowValues (IOrderedDictionary fieldValues, bool includeReadOnlyFields, bool includePrimaryKey)
+ protected virtual void ExtractRowValues (IOrderedDictionary fieldValues, bool includeReadOnlyFields, bool includeKeys)
{
foreach (DetailsViewRow row in Rows) {
if (row.Cells.Count < 1)
if (c != null)
c.ContainingField.ExtractValuesFromCell (fieldValues, c, row.RowState, includeReadOnlyFields);
}
- if (!includePrimaryKey && DataKeyNames != null)
+ if (!includeKeys && DataKeyNames != null)
foreach (string key in DataKeyNames)
fieldValues.Remove (key);
}
}
}
public
- void SetPageIndex (int newIndex)
+ void SetPageIndex (int index)
{
- DetailsViewPageEventArgs args = new DetailsViewPageEventArgs (newIndex);
+ DetailsViewPageEventArgs args = new DetailsViewPageEventArgs (index);
OnPageIndexChanging (args);
if (args.Cancel || !IsBoundUsingDataSourceID)
RequireBinding ();
}
- protected internal override void LoadControlState (object ob)
+ protected internal override void LoadControlState (object savedState)
{
- if (ob == null)
+ if (savedState == null)
return;
- object[] state = (object[]) ob;
+ object[] state = (object[]) savedState;
base.LoadControlState (state[0]);
pageIndex = (int) state[1];
pageCount = (int) state[2];
ControlStyle.LoadViewState (states [12]);
}
- void ICallbackEventHandler.RaiseCallbackEvent (string eventArgs)
+ void ICallbackEventHandler.RaiseCallbackEvent (string eventArgument)
{
- RaiseCallbackEvent (eventArgs);
+ RaiseCallbackEvent (eventArgument);
}
- protected virtual void RaiseCallbackEvent (string eventArgs)
+ protected virtual void RaiseCallbackEvent (string eventArgument)
{
- string[] clientData = eventArgs.Split ('|');
+ string[] clientData = eventArgument.Split ('|');
PageIndex = int.Parse (clientData[0]);
RaisePostBackEvent (clientData[1]);
IOrderedDictionary keys;
IOrderedDictionary values;
- public DetailsViewDeleteEventArgs (int index)
+ public DetailsViewDeleteEventArgs (int rowIndex)
{
- this.rowIndex = index;
+ this.rowIndex = rowIndex;
}
internal DetailsViewDeleteEventArgs (int index, IOrderedDictionary keys, IOrderedDictionary values)
object argument;
IOrderedDictionary values;
- public DetailsViewInsertEventArgs (object argument)
+ public DetailsViewInsertEventArgs (object commandArgument)
{
- this.argument = argument;
+ this.argument = commandArgument;
}
internal DetailsViewInsertEventArgs (object argument, IOrderedDictionary values)
this.rows = rows;
}
- public DetailsViewRow this [int i] {
- get { return (DetailsViewRow) rows [i]; }
+ public DetailsViewRow this [int index] {
+ get { return (DetailsViewRow) rows [index]; }
}
public void CopyTo (DetailsViewRow[] array, int index)
IOrderedDictionary newValues;
IOrderedDictionary oldValues;
- public DetailsViewUpdateEventArgs (object argument)
+ public DetailsViewUpdateEventArgs (object commandArgument)
{
- this.argument = argument;
+ this.argument = commandArgument;
}
internal DetailsViewUpdateEventArgs (object argument, IOrderedDictionary keys, IOrderedDictionary oldValues, IOrderedDictionary newValues)
return new FontUnit (n);
}
- public string ToString (IFormatProvider fmt)
+ public string ToString (IFormatProvider formatProvider)
{
if (type == FontSize.NotSet)
return String.Empty;
else if (type == FontSize.AsUnit)
- return unit.ToString (fmt);
+ return unit.ToString (formatProvider);
else
return font_size_names [(int) type];
}
return new FormParameter (this);
}
protected internal
- override object Evaluate (HttpContext ctx, Control control)
+ override object Evaluate (HttpContext context, Control control)
{
- HttpRequest req = ctx != null ? ctx.Request : null;
+ HttpRequest req = context != null ? context.Request : null;
if (req == null)
return null;
return arg;
}
- protected virtual FormViewRow CreateRow (int rowIndex, DataControlRowType rowType, DataControlRowState rowState)
+ protected virtual FormViewRow CreateRow (int itemIndex, DataControlRowType rowType, DataControlRowState rowState)
{
if (rowType == DataControlRowType.Pager)
- return new FormViewPagerRow (rowIndex, rowType, rowState);
+ return new FormViewPagerRow (itemIndex, rowType, rowState);
else
- return new FormViewRow (rowIndex, rowType, rowState);
+ return new FormViewRow (itemIndex, rowType, rowState);
}
void RequireBinding ()
return style;
}
- protected override int CreateChildControls (IEnumerable data, bool dataBinding)
+ protected override int CreateChildControls (IEnumerable dataSource, bool dataBinding)
{
- PagedDataSource dataSource = new PagedDataSource ();
- dataSource.DataSource = CurrentMode != FormViewMode.Insert ? data : null;
- dataSource.AllowPaging = AllowPaging;
- dataSource.PageSize = 1;
- dataSource.CurrentPageIndex = PageIndex;
+ PagedDataSource pagedDataSource = new PagedDataSource ();
+ pagedDataSource.DataSource = CurrentMode != FormViewMode.Insert ? dataSource : null;
+ pagedDataSource.AllowPaging = AllowPaging;
+ pagedDataSource.PageSize = 1;
+ pagedDataSource.CurrentPageIndex = PageIndex;
if (dataBinding && CurrentMode != FormViewMode.Insert) {
DataSourceView view = GetData ();
if (view != null && view.CanPage) {
- dataSource.AllowServerPaging = true;
+ pagedDataSource.AllowServerPaging = true;
if (SelectArguments.RetrieveTotalRowCount)
- dataSource.VirtualCount = SelectArguments.TotalRowCount;
+ pagedDataSource.VirtualCount = SelectArguments.TotalRowCount;
}
}
PagerSettings pagerSettings = PagerSettings;
- bool showPager = AllowPaging && pagerSettings.Visible && (dataSource.PageCount > 1);
+ bool showPager = AllowPaging && pagerSettings.Visible && (pagedDataSource.PageCount > 1);
Controls.Clear ();
table = CreateTable ();
// Gets the current data item
if (AllowPaging) {
- PageCount = dataSource.DataSourceCount;
+ PageCount = pagedDataSource.DataSourceCount;
if (PageIndex >= PageCount && PageCount > 0)
- pageIndex = dataSource.CurrentPageIndex = PageCount - 1;
+ pageIndex = pagedDataSource.CurrentPageIndex = PageCount - 1;
- if (dataSource.DataSource != null) {
- IEnumerator e = dataSource.GetEnumerator ();
+ if (pagedDataSource.DataSource != null) {
+ IEnumerator e = pagedDataSource.GetEnumerator ();
if (e.MoveNext ())
dataItem = e.Current;
}
} else {
int page = 0;
object lastItem = null;
- if (dataSource.DataSource != null) {
- IEnumerator e = dataSource.GetEnumerator ();
+ if (pagedDataSource.DataSource != null) {
+ IEnumerator e = pagedDataSource.GetEnumerator ();
for (; e.MoveNext (); page++) {
lastItem = e.Current;
if (page == PageIndex)
if (showPager && pagerSettings.Position == PagerPosition.Top || pagerSettings.Position == PagerPosition.TopAndBottom) {
topPagerRow = CreateRow (-1, DataControlRowType.Pager, DataControlRowState.Normal);
- InitializePager (topPagerRow, dataSource);
+ InitializePager (topPagerRow, pagedDataSource);
table.Rows.Add (topPagerRow);
}
if (showPager && pagerSettings.Position == PagerPosition.Bottom || pagerSettings.Position == PagerPosition.TopAndBottom) {
bottomPagerRow = CreateRow (0, DataControlRowType.Pager, DataControlRowState.Normal);
- InitializePager (bottomPagerRow, dataSource);
+ InitializePager (bottomPagerRow, pagedDataSource);
table.Rows.Add (bottomPagerRow);
}
return rstate;
}
- protected virtual void InitializePager (FormViewRow row, PagedDataSource dataSource)
+ protected virtual void InitializePager (FormViewRow row, PagedDataSource pagedDataSource)
{
TableCell cell = new TableCell ();
cell.ColumnSpan = 2;
if (pagerTemplate != null)
pagerTemplate.InstantiateIn (cell);
else
- cell.Controls.Add (PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, dataSource.PageCount));
+ cell.Controls.Add (PagerSettings.CreatePagerControl (pagedDataSource.CurrentPageIndex, pagedDataSource.PageCount));
row.Cells.Add (cell);
}
RequireBinding ();
}
- protected internal override void LoadControlState (object ob)
+ protected internal override void LoadControlState (object savedState)
{
- if (ob == null) return;
- object[] state = (object[]) ob;
+ if (savedState == null) return;
+ object[] state = (object[]) savedState;
base.LoadControlState (state[0]);
pageIndex = (int) state[1];
pageCount = (int) state[2];
{
object source;
- public FormViewCommandEventArgs (object source, CommandEventArgs arguments) : base (arguments)
+ public FormViewCommandEventArgs (object commandSource, CommandEventArgs originalArgs) : base (originalArgs)
{
- this.source = source;
+ this.source = commandSource;
}
public object CommandSource {
IOrderedDictionary keys;
IOrderedDictionary values;
- public FormViewDeleteEventArgs (int index)
+ public FormViewDeleteEventArgs (int rowIndex)
{
- this.rowIndex = index;
+ this.rowIndex = rowIndex;
}
internal FormViewDeleteEventArgs (int index, IOrderedDictionary keys, IOrderedDictionary values)
object argument;
IOrderedDictionary values;
- public FormViewInsertEventArgs (object argument)
+ public FormViewInsertEventArgs (object commandArgument)
{
- this.argument = argument;
+ this.argument = commandArgument;
}
internal FormViewInsertEventArgs (object argument, IOrderedDictionary values)
get;
set;
}
- public FormViewRow (int rowIndex, DataControlRowType rowType, DataControlRowState rowState)
+ public FormViewRow (int itemIndex, DataControlRowType rowType, DataControlRowState rowState)
{
- this.rowIndex = rowIndex;
+ this.rowIndex = itemIndex;
this.rowType = rowType;
this.rowState = rowState;
}
IOrderedDictionary oldValues;
IOrderedDictionary newValues;
- public FormViewUpdateEventArgs (object argument)
+ public FormViewUpdateEventArgs (object commandArgument)
{
- this.argument = argument;
+ this.argument = commandArgument;
}
internal FormViewUpdateEventArgs (object argument, IOrderedDictionary keys, IOrderedDictionary oldValues, IOrderedDictionary newValues)
}
}
- protected override int CreateChildControls (IEnumerable data, bool dataBinding)
+ protected override int CreateChildControls (IEnumerable dataSource, bool dataBinding)
{
// clear GridView
Controls.Clear ();
table = null;
rows = null;
- if (data == null)
+ if (dataSource == null)
return 0;
- PagedDataSource dataSource;
+ PagedDataSource pagedDataSource;
if (dataBinding) {
DataSourceView view = GetData ();
- dataSource = new PagedDataSource ();
- dataSource.DataSource = data;
+ pagedDataSource = new PagedDataSource ();
+ pagedDataSource.DataSource = dataSource;
if (AllowPaging) {
- dataSource.AllowPaging = true;
- dataSource.PageSize = PageSize;
+ pagedDataSource.AllowPaging = true;
+ pagedDataSource.PageSize = PageSize;
if (view.CanPage) {
- dataSource.AllowServerPaging = true;
+ pagedDataSource.AllowServerPaging = true;
if (SelectArguments.RetrieveTotalRowCount)
- dataSource.VirtualCount = SelectArguments.TotalRowCount;
+ pagedDataSource.VirtualCount = SelectArguments.TotalRowCount;
}
- if (PageIndex >= dataSource.PageCount)
- pageIndex = dataSource.PageCount - 1;
- dataSource.CurrentPageIndex = PageIndex;
+ if (PageIndex >= pagedDataSource.PageCount)
+ pageIndex = pagedDataSource.PageCount - 1;
+ pagedDataSource.CurrentPageIndex = PageIndex;
}
- PageCount = dataSource.PageCount;
+ PageCount = pagedDataSource.PageCount;
} else {
- dataSource = new PagedDataSource ();
- dataSource.DataSource = data;
+ pagedDataSource = new PagedDataSource ();
+ pagedDataSource.DataSource = dataSource;
if (AllowPaging) {
- dataSource.AllowPaging = true;
- dataSource.PageSize = PageSize;
- dataSource.CurrentPageIndex = PageIndex;
+ pagedDataSource.AllowPaging = true;
+ pagedDataSource.PageSize = PageSize;
+ pagedDataSource.CurrentPageIndex = PageIndex;
}
}
// Creates the set of fields to show
_dataEnumerator = null;
- ICollection fieldCollection = CreateColumns (dataSource, dataBinding);
+ ICollection fieldCollection = CreateColumns (pagedDataSource, dataBinding);
int fieldCount = fieldCollection.Count;
DataControlField dcf;
DataControlField[] fields = new DataControlField [fieldCount];
enumerator = _dataEnumerator;
skip_first = true;
} else
- enumerator = dataSource.GetEnumerator ();
+ enumerator = pagedDataSource.GetEnumerator ();
// Main table creation
Table mainTable = ContainedTable;
if (list.Count == 0) {
if (createPager && (PagerSettings.Position == PagerPosition.Top || PagerSettings.Position == PagerPosition.TopAndBottom)) {
- topPagerRow = CreatePagerRow (fieldCount, dataSource);
+ topPagerRow = CreatePagerRow (fieldCount, pagedDataSource);
OnRowCreated (new GridViewRowEventArgs (topPagerRow));
mainTable.Rows.Add (topPagerRow);
if (dataBinding) {
}
if (createPager && (PagerSettings.Position == PagerPosition.Bottom || PagerSettings.Position == PagerPosition.TopAndBottom)) {
- bottomPagerRow = CreatePagerRow (fieldCount, dataSource);
+ bottomPagerRow = CreatePagerRow (fieldCount, pagedDataSource);
OnRowCreated (new GridViewRowEventArgs (bottomPagerRow));
mainTable.Rows.Add (bottomPagerRow);
if (dataBinding) {
return -1;
if (AllowPaging)
- return dataSource.DataSourceCount;
+ return pagedDataSource.DataSourceCount;
else
return list.Count;
}
return row;
}
- protected virtual void InitializePager (GridViewRow row, int columnSpan, PagedDataSource dataSource)
+ protected virtual void InitializePager (GridViewRow row, int columnSpan, PagedDataSource pagedDataSource)
{
TableCell cell = new TableCell ();
if (columnSpan > 1)
if (pagerTemplate != null)
pagerTemplate.InstantiateIn (cell);
else
- cell.Controls.Add (PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, dataSource.PageCount));
+ cell.Controls.Add (PagerSettings.CreatePagerControl (pagedDataSource.CurrentPageIndex, pagedDataSource.PageCount));
row.Cells.Add (cell);
}
Sort (newSortExpression, newDirection);
}
- public virtual void Sort (string newSortExpression, SortDirection newSortDirection)
+ public virtual void Sort (string sortExpression, SortDirection sortDirection)
{
- GridViewSortEventArgs args = new GridViewSortEventArgs (newSortExpression, newSortDirection);
+ GridViewSortEventArgs args = new GridViewSortEventArgs (sortExpression, sortDirection);
OnSorting (args);
if (args.Cancel)
return;
OnSorted (EventArgs.Empty);
}
public
- void SelectRow (int index)
+ void SelectRow (int rowIndex)
{
- GridViewSelectEventArgs args = new GridViewSelectEventArgs (index);
+ GridViewSelectEventArgs args = new GridViewSelectEventArgs (rowIndex);
OnSelectedIndexChanging (args);
if (!args.Cancel) {
RequireBinding ();
}
}
public
- void SetPageIndex (int newIndex)
+ void SetPageIndex (int rowIndex)
{
- GridViewPageEventArgs args = new GridViewPageEventArgs (newIndex);
+ GridViewPageEventArgs args = new GridViewPageEventArgs (rowIndex);
OnPageIndexChanging (args);
if (args.Cancel || !IsBoundUsingDataSourceID)
OnPageIndexChanged (EventArgs.Empty);
}
public
- void SetEditRow (int index)
+ void SetEditRow (int rowIndex)
{
- GridViewEditEventArgs args = new GridViewEditEventArgs (index);
+ GridViewEditEventArgs args = new GridViewEditEventArgs (rowIndex);
OnRowEditing (args);
if (args.Cancel || !IsBoundUsingDataSourceID)
currentEditNewValues = null;
}
- protected internal override void LoadControlState (object ob)
+ protected internal override void LoadControlState (object savedState)
{
- if (ob == null)
+ if (savedState == null)
return;
- object[] state = (object[]) ob;
+ object[] state = (object[]) savedState;
base.LoadControlState (state[0]);
pageIndex = (int) state[1];
selectedIndex = (int) state[2];
((IStateManager)sortedDescendingHeaderStyle).LoadViewState (states [15]);
}
- void ICallbackEventHandler.RaiseCallbackEvent (string eventArgs)
+ void ICallbackEventHandler.RaiseCallbackEvent (string eventArgument)
{
- RaiseCallbackEvent (eventArgs);
+ RaiseCallbackEvent (eventArgument);
}
- protected virtual void RaiseCallbackEvent (string eventArgs)
+ protected virtual void RaiseCallbackEvent (string eventArgument)
{
- string[] clientData = eventArgs.Split ('|');
+ string[] clientData = eventArgument.Split ('|');
PageIndex = int.Parse (clientData[0]);
SortExpression = HttpUtility.UrlDecode (clientData [1]);
SortDirection = (SortDirection) int.Parse (clientData [2]);
return sw.ToString ();
}
- string ICallbackContainer.GetCallbackScript (IButtonControl control, string argument)
+ string ICallbackContainer.GetCallbackScript (IButtonControl buttonControl, string argument)
{
- return GetCallbackScript (control, argument);
+ return GetCallbackScript (buttonControl, argument);
}
- protected virtual string GetCallbackScript (IButtonControl control, string argument)
+ protected virtual string GetCallbackScript (IButtonControl buttonControl, string argument)
{
if (EnableSortingAndPagingCallbacks) {
Page page = Page;
if (page != null)
page.ClientScript.RegisterForEventValidation (UniqueID, argument);
- return "javascript:GridView_ClientEvent (\"" + ClientID + "\",\"" + control.CommandName + "$" + control.CommandArgument + "\"); return false;";
+ return "javascript:GridView_ClientEvent (\"" + ClientID + "\",\"" + buttonControl.CommandName + "$" + buttonControl.CommandArgument + "\"); return false;";
} else
return null;
}
IOrderedDictionary keys;
IOrderedDictionary values;
- public GridViewDeleteEventArgs (int index)
+ public GridViewDeleteEventArgs (int rowIndex)
{
- this.rowIndex = index;
+ this.rowIndex = rowIndex;
}
internal GridViewDeleteEventArgs (int index, IOrderedDictionary keys, IOrderedDictionary values)
this.rows = rows;
}
- public GridViewRow this [int i] {
- get { return (GridViewRow) rows [i]; }
+ public GridViewRow this [int index] {
+ get { return (GridViewRow) rows [index]; }
}
public void CopyTo (GridViewRow[] array, int index)
typeof (RectangleHotSpot)
};
- public HotSpot this [int idx] {
- get { return (HotSpot) ((IList)this)[idx]; }
+ public HotSpot this [int index] {
+ get { return (HotSpot) ((IList)this)[index]; }
}
public int Add (HotSpot spot)
return ((IList)this).Add (spot);
}
- protected override object CreateKnownType (int idx)
+ protected override object CreateKnownType (int index)
{
- switch (idx) {
+ switch (index) {
case 0:
return new CircleHotSpot ();
case 1:
return _knownTypes;
}
- public void Insert (int idx, HotSpot spot)
+ public void Insert (int index, HotSpot spot)
{
- ((IList)this).Insert (idx, spot);
+ ((IList)this).Insert (index, spot);
}
protected override void OnValidate (object o)
((IList)this).Remove (spot);
}
- public void RemoveAt (int idx)
+ public void RemoveAt (int index)
{
- ((IList)this).RemoveAt (idx);
+ ((IList)this).RemoveAt (index);
}
protected override void SetDirtyObject (object o)
{
}
- protected override void AddAttributesToRender (HtmlTextWriter w)
+ protected override void AddAttributesToRender (HtmlTextWriter writer)
{
- base.AddAttributesToRender (w);
- AddDisplayStyleAttribute (w);
+ base.AddAttributesToRender (writer);
+ AddDisplayStyleAttribute (writer);
if (!IsEnabled)
return;
// add attributes - only if they're not empty
string t = Target;
string s = NavigateUrl;
if (s.Length > 0)
- w.AddAttribute (HtmlTextWriterAttribute.Href, ResolveClientUrl (s));
+ writer.AddAttribute (HtmlTextWriterAttribute.Href, ResolveClientUrl (s));
if (t.Length > 0)
- w.AddAttribute (HtmlTextWriterAttribute.Target, t);
+ writer.AddAttribute (HtmlTextWriterAttribute.Target, t);
}
protected override void AddParsedSubObject (object obj)
base.LoadViewState (savedState);
}
- protected internal override void RenderContents (HtmlTextWriter w)
+ protected internal override void RenderContents (HtmlTextWriter writer)
{
if (HasControls () || HasRenderMethodDelegate ()) {
- base.RenderContents (w);
+ base.RenderContents (writer);
return;
}
string image_url = ImageUrl;
if (!String.IsNullOrEmpty (image_url)) {
string str = ToolTip;
if (!String.IsNullOrEmpty (str))
- w.AddAttribute (HtmlTextWriterAttribute.Title, str);
+ writer.AddAttribute (HtmlTextWriterAttribute.Title, str);
- w.AddAttribute (HtmlTextWriterAttribute.Src, ResolveClientUrl (image_url));
+ writer.AddAttribute (HtmlTextWriterAttribute.Src, ResolveClientUrl (image_url));
str = Text;
- w.AddAttribute (HtmlTextWriterAttribute.Alt, str);
- w.RenderBeginTag (HtmlTextWriterTag.Img);
- w.RenderEndTag ();
+ writer.AddAttribute (HtmlTextWriterAttribute.Alt, str);
+ writer.RenderBeginTag (HtmlTextWriterTag.Img);
+ writer.RenderEndTag ();
} else
- w.Write (Text);
+ writer.Write (Text);
}
[Bindable(true)]
set { ViewState ["Text"] = value; }
}
- protected virtual string FormatDataNavigateUrlValue (object value)
+ protected virtual string FormatDataNavigateUrlValue (object dataUrlValue)
{
string format = DataNavigateUrlFormatString;
if (format == "")
format = null;
- return DataBinder.FormatResult (value, format);
+ return DataBinder.FormatResult (dataUrlValue, format);
}
- protected virtual string FormatDataTextValue (object value)
+ protected virtual string FormatDataTextValue (object dataTextValue)
{
string format = DataTextFormatString;
if (format == "")
format = null;
- return DataBinder.FormatResult (value, format);
+ return DataBinder.FormatResult (dataTextValue, format);
}
public override void Initialize ()
ctrl.Target = Target;
}
- public override void InitializeCell (TableCell cell, int column_index, ListItemType item_type)
+ public override void InitializeCell (TableCell cell, int columnIndex, ListItemType itemType)
{
- base.InitializeCell (cell, column_index, item_type);
+ base.InitializeCell (cell, columnIndex, itemType);
- switch (item_type)
+ switch (itemType)
{
case ListItemType.Separator:
case ListItemType.Pager:
PropertyDescriptor[] urlProperties;
static string[] emptyFields;
- public override bool Initialize (bool sortingEnabled, Control control)
+ public override bool Initialize (bool enableSorting, Control control)
{
- return base.Initialize (sortingEnabled, control);
+ return base.Initialize (enableSorting, control);
}
[EditorAttribute ("System.Web.UI.Design.WebControls.DataFieldEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
PropertyDescriptor imageProperty;
PropertyDescriptor textProperty;
- public override bool Initialize (bool sortingEnabled, Control control)
+ public override bool Initialize (bool enableSorting, Control control)
{
- return base.Initialize (sortingEnabled, control);
+ return base.Initialize (enableSorting, control);
}
[DefaultValueAttribute ("")]
}
}
- protected virtual string FormatImageUrlValue (object value)
+ protected virtual string FormatImageUrlValue (object dataValue)
{
- if (value == null)
+ if (dataValue == null)
return null;
else if (DataImageUrlFormatString.Length > 0)
- return string.Format (DataImageUrlFormatString, value);
+ return string.Format (DataImageUrlFormatString, dataValue);
else
- return value.ToString ();
+ return dataValue.ToString ();
}
protected virtual string GetFormattedAlternateText (Control controlContainer)
{
}
- protected override void AddAttributesToRender (HtmlTextWriter w)
+ protected override void AddAttributesToRender (HtmlTextWriter writer)
{
Page page = Page;
if (page != null)
page.VerifyRenderingInServerForm (this);
- base.AddAttributesToRender (w);
+ base.AddAttributesToRender (writer);
bool enabled = IsEnabled;
string onclick = OnClientClick;
onclick = ClientScriptManager.EnsureEndsWithSemicolon (onclick);
}
if (onclick.Length > 0)
- w.AddAttribute (HtmlTextWriterAttribute.Onclick, onclick);
+ writer.AddAttribute (HtmlTextWriterAttribute.Onclick, onclick);
if (enabled && page != null) {
PostBackOptions options = GetPostBackOptions ();
string href = page.ClientScript.GetPostBackEventReference (options, true);
- w.AddAttribute (HtmlTextWriterAttribute.Href, href);
+ writer.AddAttribute (HtmlTextWriterAttribute.Href, href);
}
- AddDisplayStyleAttribute (w);
+ AddDisplayStyleAttribute (writer);
}
protected virtual void RaisePostBackEvent (string eventArgument)
}
}
- protected override void AddAttributesToRender (HtmlTextWriter w)
+ protected override void AddAttributesToRender (HtmlTextWriter writer)
{
- base.AddAttributesToRender (w);
+ base.AddAttributesToRender (writer);
}
public virtual void ClearSelection ()
{
}
- public static ListItem FromString (string text)
+ public static ListItem FromString (string s)
{
- return new ListItem (text);
+ return new ListItem (s);
}
public override bool Equals (object o)
}
protected internal
- override void Render (HtmlTextWriter output)
+ override void Render (HtmlTextWriter writer)
{
if (Mode == LiteralMode.Encode)
- output.Write (HttpUtility.HtmlEncode (Text));
+ writer.Write (HttpUtility.HtmlEncode (Text));
else
- output.Write (Text);
+ writer.Write (Text);
}
}
}
return null;
}
- protected override void LoadViewState (object savedState)
+ protected override void LoadViewState (object state)
{
- if (savedState == null)
+ if (state == null)
return;
- object [] states = (object []) savedState;
+ object [] states = (object []) state;
base.LoadViewState (states[0]);
if (states[1] != null)
base.OnInit (e);
}
- protected internal override void LoadControlState (object ob)
+ protected internal override void LoadControlState (object savedState)
{
- if (ob == null) return;
- object[] state = (object[]) ob;
+ if (savedState == null) return;
+ object[] state = (object[]) savedState;
base.LoadControlState (state[0]);
selectedItemPath = state[1] as string;
}
base.DataBind ();
}
- protected override bool OnBubbleEvent (object source, EventArgs args)
+ protected override bool OnBubbleEvent (object source, EventArgs e)
{
- if (!(args is CommandEventArgs))
+ if (!(e is CommandEventArgs))
return false;
- MenuEventArgs menuArgs = args as MenuEventArgs;
+ MenuEventArgs menuArgs = e as MenuEventArgs;
if (menuArgs != null && string.Equals (menuArgs.CommandName, MenuItemClickCommandName))
OnMenuItemClick (menuArgs);
return true;
return types;
}
- public int IndexOf (MenuItemBinding binding)
+ public int IndexOf (MenuItemBinding value)
{
- return ((IList)this).IndexOf (binding);
+ return ((IList)this).IndexOf (value);
}
public void Insert (int index, MenuItemBinding binding)
item.Menu = menu;
}
- public MenuItem this [int i] {
- get { return (MenuItem) items [i]; }
+ public MenuItem this [int index] {
+ get { return (MenuItem) items [index]; }
}
public void Add (MenuItem child)
}
}
- public bool Contains (MenuItem child)
+ public bool Contains (MenuItem c)
{
- return items.Contains (child);
+ return items.Contains (c);
}
- public void CopyTo (Array itemArray, int index)
+ public void CopyTo (Array array, int index)
{
- items.CopyTo (itemArray, index);
+ items.CopyTo (array, index);
}
- public void CopyTo (MenuItem[] itemArray, int index)
+ public void CopyTo (MenuItem[] array, int index)
{
- items.CopyTo (itemArray, index);
+ items.CopyTo (array, index);
}
public IEnumerator GetEnumerator ()
return items.GetEnumerator ();
}
- public int IndexOf (MenuItem item)
+ public int IndexOf (MenuItem value)
{
- return items.IndexOf (item);
+ return items.IndexOf (value);
}
- public void Remove (MenuItem item)
+ public void Remove (MenuItem value)
{
- int i = IndexOf (item);
+ int i = IndexOf (value);
if (i == -1) return;
items.RemoveAt (i);
if (menu != null)
- item.Menu = null;
+ value.Menu = null;
if (marked) {
SetDirty ();
}
return ((IList)this).Contains (style);
}
- public void CopyTo (MenuItemStyle[] array, int index)
+ public void CopyTo (MenuItemStyle[] styleArray, int index)
{
- ((IList)this).CopyTo (array, index);
+ ((IList)this).CopyTo (styleArray, index);
}
protected override object CreateKnownType (int index)
object dataItem;
int index;
- public MenuItemTemplateContainer (int itemIndex, MenuItem menuItem)
+ public MenuItemTemplateContainer (int itemIndex, MenuItem dataItem)
{
- index = itemIndex;
- dataItem = menuItem;
+ this.index = itemIndex;
+ this.dataItem = dataItem;
}
- protected override bool OnBubbleEvent (object source, EventArgs args)
+ protected override bool OnBubbleEvent (object source, EventArgs e)
{
- CommandEventArgs command = args as CommandEventArgs;
+ CommandEventArgs command = e as CommandEventArgs;
if (command == null)
return false;
remove { Events.RemoveHandler (ActiveViewChangedEvent, value); }
}
- protected override void AddParsedSubObject (object ob)
+ protected override void AddParsedSubObject (object obj)
{
- if (ob is View)
- Controls.Add (ob as View);
+ if (obj is View)
+ Controls.Add (obj as View);
// LAMESPEC: msdn talks that only View contorls are allowed, for others controls HttpException should be thrown
// but actually, aspx praser adds LiteralControl controls.
//else
return source.GetEnumerator ();
}
- public PropertyDescriptorCollection GetItemProperties (PropertyDescriptor [] list_accessors)
+ public PropertyDescriptorCollection GetItemProperties (PropertyDescriptor [] listAccessors)
{
ITypedList typed = source as ITypedList;
if (typed == null)
return null;
- return typed.GetItemProperties (list_accessors);
+ return typed.GetItemProperties (listAccessors);
}
- public string GetListName (PropertyDescriptor [] list_accessors)
+ public string GetListName (PropertyDescriptor [] listAccessors)
{
return String.Empty; // as documented
}
{
}
- protected override void AddAttributesToRender (HtmlTextWriter w)
+ protected override void AddAttributesToRender (HtmlTextWriter writer)
{
- base.AddAttributesToRender (w);
+ base.AddAttributesToRender (writer);
string image = BackImageUrl;
if (image != "") {
image = ResolveClientUrl (image);
- w.AddStyleAttribute (HtmlTextWriterStyle.BackgroundImage, image);
+ writer.AddStyleAttribute (HtmlTextWriterStyle.BackgroundImage, image);
}
if (!String.IsNullOrEmpty (DefaultButton) && Page != null) {
Page.ClientScript.RegisterWebFormClientScript ();
- w.AddAttribute ("onkeypress",
+ writer.AddAttribute ("onkeypress",
"javascript:return " + Page.WebFormScriptReference + ".WebForm_FireDefaultButton(event, '" + button.ClientID + "')");
}
if (Direction != ContentDirection.NotSet) {
- w.AddAttribute (HtmlTextWriterAttribute.Dir, Direction == ContentDirection.RightToLeft ? "rtl" : "ltr", false);
+ writer.AddAttribute (HtmlTextWriterAttribute.Dir, Direction == ContentDirection.RightToLeft ? "rtl" : "ltr", false);
}
switch (ScrollBars) {
case ScrollBars.Auto:
- w.AddStyleAttribute (HtmlTextWriterStyle.Overflow, "auto");
+ writer.AddStyleAttribute (HtmlTextWriterStyle.Overflow, "auto");
break;
case ScrollBars.Both:
- w.AddStyleAttribute (HtmlTextWriterStyle.Overflow, "scroll");
+ writer.AddStyleAttribute (HtmlTextWriterStyle.Overflow, "scroll");
break;
case ScrollBars.Horizontal:
- w.AddStyleAttribute (HtmlTextWriterStyle.OverflowX, "scroll");
+ writer.AddStyleAttribute (HtmlTextWriterStyle.OverflowX, "scroll");
break;
case ScrollBars.Vertical:
- w.AddStyleAttribute (HtmlTextWriterStyle.OverflowY, "scroll");
+ writer.AddStyleAttribute (HtmlTextWriterStyle.OverflowY, "scroll");
break;
}
if (!Wrap) {
- w.AddStyleAttribute (HtmlTextWriterStyle.WhiteSpace, "nowrap");
+ writer.AddStyleAttribute (HtmlTextWriterStyle.WhiteSpace, "nowrap");
}
string align = "";
}
if (align != "")
- w.AddStyleAttribute (HtmlTextWriterStyle.TextAlign, align);
+ writer.AddStyleAttribute (HtmlTextWriterStyle.TextAlign, align);
}
PanelStyle PanelStyle {
get { return (ControlStyle as PanelStyle); }
EventHandler _parametersChanged;
- public int Add (Parameter param)
+ public int Add (Parameter parameter)
{
- return ((IList)this).Add (param);
+ return ((IList)this).Add (parameter);
}
public int Add (string name, string value)
return ((IList)this).Add (new Parameter (name, dbType, value));
}
- protected override object CreateKnownType (int idx)
+ protected override object CreateKnownType (int index)
{
- switch (idx) {
+ switch (index) {
case 0:
return new ControlParameter ();
case 1:
param.UpdateValue (context, control);
}
- public void Insert (int idx, Parameter param)
+ public void Insert (int index, Parameter parameter)
{
- ((IList)this).Insert (idx, param);
+ ((IList)this).Insert (index, parameter);
}
protected override void OnClearComplete ()
OnParametersChanged (EventArgs.Empty);
}
- protected override void OnInsert (int idx, object value)
+ protected override void OnInsert (int index, object value)
{
- base.OnInsert (idx, value);
+ base.OnInsert (index, value);
((Parameter)value).SetOwnerCollection (this);
}
- protected override void OnInsertComplete (int idx, object value)
+ protected override void OnInsertComplete (int index, object value)
{
- base.OnInsertComplete (idx, value);
+ base.OnInsertComplete (index, value);
OnParametersChanged (EventArgs.Empty);
}
throw new ArgumentException ("o is not a Parameter");
}
- public void Remove (Parameter param)
+ public void Remove (Parameter parameter)
{
- ((IList)this).Remove (param);
+ ((IList)this).Remove (parameter);
}
- public void RemoveAt (int idx)
+ public void RemoveAt (int index)
{
- ((IList)this).RemoveAt (idx);
+ ((IList)this).RemoveAt (index);
}
protected override void SetDirtyObject (object o)
return -1;
}
- public Parameter this[int idx] {
+ public Parameter this[int index] {
get {
- return (Parameter) ((IList)this)[idx];
+ return (Parameter) ((IList)this)[index];
}
set {
- ((IList)this)[idx] = value;
+ ((IList)this)[index] = value;
}
}
remove { _parametersChanged -= value; }
}
- public bool Contains (Parameter param)
+ public bool Contains (Parameter parameter)
{
- return ((IList)this).Contains (param);
+ return ((IList)this).Contains (parameter);
}
- public void CopyTo (Parameter[] paramArray, int index)
+ public void CopyTo (Parameter[] parameterArray, int index)
{
- ((IList)this).CopyTo (paramArray, index);
+ ((IList)this).CopyTo (parameterArray, index);
}
- public int IndexOf (Parameter param)
+ public int IndexOf (Parameter parameter)
{
- return ((IList)this).IndexOf (param);
+ return ((IList)this).IndexOf (parameter);
}
protected override void OnRemoveComplete (int index, object value)
return new QueryStringParameter (this);
}
protected internal
- override object Evaluate (HttpContext ctx, Control control)
+ override object Evaluate (HttpContext context, Control control)
{
- if (ctx == null || ctx.Request == null)
+ if (context == null || context.Request == null)
return null;
- return ctx.Request.QueryString [QueryStringField];
+ return context.Request.QueryString [QueryStringField];
}
[DefaultValueAttribute ("")]
{
}
- protected override void AddAttributesToRender (HtmlTextWriter w)
+ protected override void AddAttributesToRender (HtmlTextWriter writer)
{
if (RenderUplevel) {
RegisterExpandoAttribute (ClientID, "evaluationfunction", "RegularExpressionValidatorEvaluateIsValid");
RegisterExpandoAttribute (ClientID, "validationexpression", ValidationExpression, true);
}
- base.AddAttributesToRender (w);
+ base.AddAttributesToRender (writer);
}
protected override bool EvaluateIsValid ()
public sealed class RepeatInfo {
// What is baseControl for ?
- public void RenderRepeater (HtmlTextWriter w, IRepeatInfoUser user, Style controlStyle, WebControl baseControl)
+ public void RenderRepeater (HtmlTextWriter writer, IRepeatInfoUser user, Style controlStyle, WebControl baseControl)
{
PrintValues (user);
RepeatLayout layout = RepeatLayout;
}
if (RepeatDirection == RepeatDirection.Vertical) {
if (listLayout)
- RenderList (w, user, controlStyle, baseControl);
+ RenderList (writer, user, controlStyle, baseControl);
else
- RenderVert (w, user, controlStyle, baseControl);
+ RenderVert (writer, user, controlStyle, baseControl);
} else {
if (listLayout)
throw new InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.");
- RenderHoriz (w, user, controlStyle, baseControl);
+ RenderHoriz (writer, user, controlStyle, baseControl);
}
}
// attributes
[ToolboxData ("<{0}:RequiredFieldValidator runat=\"server\" ErrorMessage=\"RequiredFieldValidator\"></{0}:RequiredFieldValidator>")]
public class RequiredFieldValidator : BaseValidator {
- protected override void AddAttributesToRender (HtmlTextWriter w)
+ protected override void AddAttributesToRender (HtmlTextWriter writer)
{
if (RenderUplevel) {
RegisterExpandoAttribute (ClientID, "evaluationfunction", "RequiredFieldValidatorEvaluateIsValid");
RegisterExpandoAttribute (ClientID, "initialvalue", InitialValue, true);
}
- base.AddAttributesToRender (w);
+ base.AddAttributesToRender (writer);
}
protected override bool EvaluateIsValid ()
string value;
bool is_valid;
- public ServerValidateEventArgs (string value, bool is_valid)
+ public ServerValidateEventArgs (string value, bool isValid)
{
this.value = value;
- this.is_valid = is_valid;
+ this.is_valid = isValid;
}
public string Value {
return new SessionParameter (this);
}
protected internal
- override object Evaluate (HttpContext ctx, Control control)
+ override object Evaluate (HttpContext context, Control control)
{
- if (ctx == null || ctx.Session == null)
+ if (context == null || context.Session == null)
return null;
- return ctx.Session [SessionField];
+ return context.Session [SessionField];
}
[DefaultValueAttribute ("")]
{
SiteMapNodeCollection collection;
- public SiteMapDataSourceView (SiteMapDataSource owner, string viewName, SiteMapNode node)
- : this (owner, viewName, new SiteMapNodeCollection (node))
+ public SiteMapDataSourceView (SiteMapDataSource owner, string name, SiteMapNode node)
+ : this (owner, name, new SiteMapNodeCollection (node))
{
}
- public SiteMapDataSourceView (SiteMapDataSource owner, string viewName, SiteMapNodeCollection collection)
- : base (owner, viewName)
+ public SiteMapDataSourceView (SiteMapDataSource owner, string name, SiteMapNodeCollection collection)
+ : base (owner, name)
{
this.collection = collection;
}
}
[MonoTODO ("why override?")]
- protected internal override void Render (HtmlTextWriter w)
+ protected internal override void Render (HtmlTextWriter writer)
{
- base.Render (w);
+ base.Render (writer);
}
- protected internal override void RenderContents (HtmlTextWriter w)
+ protected internal override void RenderContents (HtmlTextWriter writer)
{
string skip_id = ClientID + "_SkipLink";
string altText = SkipLinkText;
if (needAnchor) {
// Anchor start
- w.AddAttribute (HtmlTextWriterAttribute.Href, "#" + skip_id);
- w.RenderBeginTag (HtmlTextWriterTag.A);
+ writer.AddAttribute (HtmlTextWriterAttribute.Href, "#" + skip_id);
+ writer.RenderBeginTag (HtmlTextWriterTag.A);
// Image
- w.AddAttribute (HtmlTextWriterAttribute.Alt, altText);
- w.AddAttribute (HtmlTextWriterAttribute.Height, "0");
- w.AddAttribute (HtmlTextWriterAttribute.Width, "0");
- w.AddAttribute (HtmlTextWriterAttribute.Src, Page.ClientScript.GetWebResourceUrl (typeof (SiteMapPath), "transparent.gif"));
- w.AddStyleAttribute (HtmlTextWriterStyle.BorderWidth, "0px");
- w.RenderBeginTag (HtmlTextWriterTag.Img);
- w.RenderEndTag ();
+ writer.AddAttribute (HtmlTextWriterAttribute.Alt, altText);
+ writer.AddAttribute (HtmlTextWriterAttribute.Height, "0");
+ writer.AddAttribute (HtmlTextWriterAttribute.Width, "0");
+ writer.AddAttribute (HtmlTextWriterAttribute.Src, Page.ClientScript.GetWebResourceUrl (typeof (SiteMapPath), "transparent.gif"));
+ writer.AddStyleAttribute (HtmlTextWriterStyle.BorderWidth, "0px");
+ writer.RenderBeginTag (HtmlTextWriterTag.Img);
+ writer.RenderEndTag ();
- w.RenderEndTag ();
+ writer.RenderEndTag ();
}
- base.RenderContents (w);
+ base.RenderContents (writer);
if (needAnchor) {
- w.AddAttribute(HtmlTextWriterAttribute.Id, skip_id);
- w.RenderBeginTag(HtmlTextWriterTag.A);
- w.RenderEndTag();
+ writer.AddAttribute(HtmlTextWriterAttribute.Id, skip_id);
+ writer.RenderBeginTag(HtmlTextWriterTag.A);
+ writer.RenderEndTag();
}
}
return View.Delete (null, null);
}
- public IEnumerable Select (DataSourceSelectArguments args)
+ public IEnumerable Select (DataSourceSelectArguments arguments)
{
- return View.Select (args);
+ return View.Select (arguments);
}
public int Update ()
registered_class = name;
}
- public CssStyleCollection GetStyleAttributes (IUrlResolutionService resolver)
+ public CssStyleCollection GetStyleAttributes (IUrlResolutionService urlResolver)
{
CssStyleCollection col = new CssStyleCollection ();
- FillStyleAttributes (col, resolver);
+ FillStyleAttributes (col, urlResolver);
return col;
}
return ((IList)this).Contains (style);
}
- public void CopyTo (SubMenuStyle[] array, int index)
+ public void CopyTo (SubMenuStyle[] styleArray, int index)
{
- ((IList)this).CopyTo (array, index);
+ ((IList)this).CopyTo (styleArray, index);
}
protected override object CreateKnownType (int index)
"search"
};
- protected override void AddAttributesToRender (HtmlTextWriter w)
+ protected override void AddAttributesToRender (HtmlTextWriter writer)
{
Page page = Page;
if (page != null)
switch (TextMode) {
case TextBoxMode.MultiLine:
if (Columns != 0)
- w.AddAttribute (HtmlTextWriterAttribute.Cols, Columns.ToString (), false);
+ writer.AddAttribute (HtmlTextWriterAttribute.Cols, Columns.ToString (), false);
else
- w.AddAttribute (HtmlTextWriterAttribute.Cols, "20", false);
+ writer.AddAttribute (HtmlTextWriterAttribute.Cols, "20", false);
if (Rows != 0)
- w.AddAttribute (HtmlTextWriterAttribute.Rows, Rows.ToString (), false);
+ writer.AddAttribute (HtmlTextWriterAttribute.Rows, Rows.ToString (), false);
else
- w.AddAttribute (HtmlTextWriterAttribute.Rows, "2", false);
+ writer.AddAttribute (HtmlTextWriterAttribute.Rows, "2", false);
if (!Wrap)
- w.AddAttribute (HtmlTextWriterAttribute.Wrap, "off", false);
+ writer.AddAttribute (HtmlTextWriterAttribute.Wrap, "off", false);
break;
case TextBoxMode.Password:
if (TextMode == TextBoxMode.Password)
- w.AddAttribute (HtmlTextWriterAttribute.Type, "password", false);
+ writer.AddAttribute (HtmlTextWriterAttribute.Type, "password", false);
else {
- w.AddAttribute (HtmlTextWriterAttribute.Type, "text", false);
+ writer.AddAttribute (HtmlTextWriterAttribute.Type, "text", false);
if (Text.Length > 0)
- w.AddAttribute (HtmlTextWriterAttribute.Value, Text);
+ writer.AddAttribute (HtmlTextWriterAttribute.Value, Text);
}
if (Columns != 0)
- w.AddAttribute (HtmlTextWriterAttribute.Size, Columns.ToString (), false);
+ writer.AddAttribute (HtmlTextWriterAttribute.Size, Columns.ToString (), false);
if (MaxLength != 0)
- w.AddAttribute (HtmlTextWriterAttribute.Maxlength, MaxLength.ToString (), false);
+ writer.AddAttribute (HtmlTextWriterAttribute.Maxlength, MaxLength.ToString (), false);
if (AutoCompleteType != AutoCompleteType.None && TextMode == TextBoxMode.SingleLine)
if (AutoCompleteType != AutoCompleteType.Disabled)
- w.AddAttribute (HtmlTextWriterAttribute.VCardName, VCardValues [(int) AutoCompleteType]);
+ writer.AddAttribute (HtmlTextWriterAttribute.VCardName, VCardValues [(int) AutoCompleteType]);
else
- w.AddAttribute (HtmlTextWriterAttribute.AutoComplete, "off", false);
+ writer.AddAttribute (HtmlTextWriterAttribute.AutoComplete, "off", false);
break;
}
if (AutoPostBack) {
- w.AddAttribute ("onkeypress", "if (WebForm_TextBoxKeyHandler(event) == false) return false;", false);
+ writer.AddAttribute ("onkeypress", "if (WebForm_TextBoxKeyHandler(event) == false) return false;", false);
if (page != null) {
string onchange = page.ClientScript.GetPostBackEventReference (GetPostBackOptions (), true);
onchange = String.Concat ("setTimeout('", onchange.Replace ("\\", "\\\\").Replace ("'", "\\'"), "', 0)");
- w.AddAttribute (HtmlTextWriterAttribute.Onchange, BuildScriptAttribute ("onchange", onchange));
+ writer.AddAttribute (HtmlTextWriterAttribute.Onchange, BuildScriptAttribute ("onchange", onchange));
}
} else if (page != null)
page.ClientScript.RegisterForEventValidation (UniqueID, String.Empty);
if (ReadOnly)
- w.AddAttribute (HtmlTextWriterAttribute.ReadOnly, "ReadOnly", false);
+ writer.AddAttribute (HtmlTextWriterAttribute.ReadOnly, "ReadOnly", false);
- w.AddAttribute (HtmlTextWriterAttribute.Name, UniqueID);
+ writer.AddAttribute (HtmlTextWriterAttribute.Name, UniqueID);
- base.AddAttributesToRender (w);
+ base.AddAttributesToRender (writer);
}
protected override void AddParsedSubObject (object obj)
}
protected internal
- override void Render (HtmlTextWriter w)
+ override void Render (HtmlTextWriter writer)
{
// Why didn't msft just override RenderContents!?
- RenderBeginTag (w);
+ RenderBeginTag (writer);
if (TextMode == TextBoxMode.MultiLine) {
- w.WriteLine ();
- HttpUtility.HtmlEncode (Text, w);
+ writer.WriteLine ();
+ HttpUtility.HtmlEncode (Text, writer);
}
- RenderEndTag (w);
+ RenderEndTag (writer);
}
protected virtual
Expanded = !Expanded.GetValueOrDefault(false);
}
- void IStateManager.LoadViewState (object savedState)
+ void IStateManager.LoadViewState (object state)
{
- LoadViewState (savedState);
+ LoadViewState (state);
}
- protected virtual void LoadViewState (object savedState)
+ protected virtual void LoadViewState (object state)
{
- if (savedState == null)
+ if (state == null)
return;
- object[] states = (object[]) savedState;
+ object[] states = (object[]) state;
ViewState.LoadViewState (states [0]);
if (tree != null && SelectedFlag)
return ((IList)this).Contains (binding);
}
- public void CopyTo (TreeNodeBinding[] array, int index)
+ public void CopyTo (TreeNodeBinding[] bindingArray, int index)
{
- ((IList)this).CopyTo (array, index);
+ ((IList)this).CopyTo (bindingArray, index);
}
protected override object CreateKnownType (int index)
node.Tree = tree;
}
- public TreeNode this [int i] {
- get { return (TreeNode) items [i]; }
+ public TreeNode this [int index] {
+ get { return (TreeNode) items [index]; }
}
public void Add (TreeNode child)
}
}
- public bool Contains (TreeNode child)
+ public bool Contains (TreeNode c)
{
- return items.Contains (child);
+ return items.Contains (c);
}
public void CopyTo (TreeNode[] nodeArray, int index)
return items.GetEnumerator ();
}
- public int IndexOf (TreeNode node)
+ public int IndexOf (TreeNode value)
{
- return items.IndexOf (node);
+ return items.IndexOf (value);
}
- public void Remove (TreeNode node)
+ public void Remove (TreeNode value)
{
- int i = IndexOf (node);
+ int i = IndexOf (value);
if (i == -1) return;
items.RemoveAt (i);
if (tree != null)
- node.Tree = null;
+ value.Tree = null;
if (marked) {
SetDirty ();
}
return ((IList)this).Contains (style);
}
- public void CopyTo (TreeNodeStyle[] array, int index)
+ public void CopyTo (TreeNodeStyle[] styleArray, int index)
{
- ((IList)this).CopyTo (array, index);
+ ((IList)this).CopyTo (styleArray, index);
}
protected override object CreateKnownType (int index)
return null;
}
- protected override void LoadViewState (object savedState)
+ protected override void LoadViewState (object state)
{
- if (savedState == null)
+ if (state == null)
return;
- object [] states = (object []) savedState;
+ object [] states = (object []) state;
base.LoadViewState (states[0]);
if (states[1] != null)
}
string callbackResult;
- protected virtual void RaiseCallbackEvent (string eventArgs)
+ protected virtual void RaiseCallbackEvent (string eventArgument)
{
- string[] args = eventArgs.Split ('|');
+ string[] args = eventArgument.Split ('|');
RequiresDataBinding = true;
EnsureDataBound ();
return ToString (Helpers.InvariantCulture);
}
- public string ToString (IFormatProvider provider)
+ public string ToString (IFormatProvider formatProvider)
{
if (type == 0)
return String.Empty;
string ex = GetExtension (type);
- return value.ToString (provider) + ex;
+ return value.ToString (formatProvider) + ex;
}
}
throw new NotImplementedException ();
}
- protected internal override void LoadControlState (object ob)
+ protected internal override void LoadControlState (object state)
{
- if (ob == null) return;
- object[] state = (object[]) ob;
- base.LoadControlState (state[0]);
- activeStepIndex = (int) state[1];
- history = (ArrayList) state[2];
+ if (state == null) return;
+ object[] controlState = (object[]) state;
+ base.LoadControlState (controlState[0]);
+ activeStepIndex = (int) controlState[1];
+ history = (ArrayList) controlState[2];
}
protected internal override object SaveControlState ()
int nxtStepIndex;
bool cancel;
- public WizardNavigationEventArgs (int currentIndex, int nextIndex)
+ public WizardNavigationEventArgs (int currentStepIndex, int nextStepIndex)
{
- this.curStepIndex = currentIndex;
- this.nxtStepIndex = nextIndex;
+ this.curStepIndex = currentStepIndex;
+ this.nxtStepIndex = nextStepIndex;
cancel = false;
}
//
namespace System.Web.UI.WebControls {
- public delegate void WizardNavigationEventHandler (object source, WizardNavigationEventArgs e);
+ public delegate void WizardNavigationEventHandler (object sender, WizardNavigationEventArgs e);
}
this.bag = bag;
}
- public override bool Equals (object obj)
+ public override bool Equals (object o)
{
- AttributeCollection other = obj as AttributeCollection;
+ AttributeCollection other = o as AttributeCollection;
if (other == null) {
return false;
}
return (bool) attr_render [null];
}
- protected override bool OnStyleAttributeRender (string styleAttrName, string value, HtmlTextWriterStyle key)
+ protected override bool OnStyleAttributeRender (string name, string value, HtmlTextWriterStyle key)
{
return key == HtmlTextWriterStyle.Display;
}
- protected override bool OnTagRender (string name, HtmlTextWriterTag tag)
+ protected override bool OnTagRender (string name, HtmlTextWriterTag key)
{
- return tag != HtmlTextWriterTag.Span;
+ return key != HtmlTextWriterTag.Span;
}
}
}
{
BuildTemplateMethod templateMethod;
- public CompiledTemplateBuilder (BuildTemplateMethod templateMethod)
+ public CompiledTemplateBuilder (BuildTemplateMethod buildTemplateMethod)
{
- this.templateMethod = templateMethod;
+ this.templateMethod = buildTemplateMethod;
}
- public void InstantiateIn (Control ctrl)
+ public void InstantiateIn (Control container)
{
- templateMethod (ctrl);
+ templateMethod (container);
}
}
}
Page.SetFocus (this);
}
- protected internal virtual void LoadControlState (object state)
+ protected internal virtual void LoadControlState (object savedState)
{
}
return new SimpleEnumerator (this);
}
- public virtual int IndexOf (Control c)
+ public virtual int IndexOf (Control value)
{
- if (controls == null || c == null)
+ if (controls == null || value == null)
return -1;
- return Array.IndexOf (controls, c);
+ return Array.IndexOf (controls, value);
}
public virtual void Remove (Control value)
object propertyValue;
Type propertyType;
- public ControlValuePropertyAttribute (string propName)
+ public ControlValuePropertyAttribute (string name)
{
- this.propertyName = propName;
+ this.propertyName = name;
}
- public ControlValuePropertyAttribute (string propName, object propValue)
+ public ControlValuePropertyAttribute (string name, object defaultValue)
{
- this.propertyName = propName;
- this.propertyValue = propValue;
+ this.propertyName = name;
+ this.propertyValue = defaultValue;
}
- public ControlValuePropertyAttribute (string propName, Type type, string propValue)
+ public ControlValuePropertyAttribute (string name, Type type, string defaultValue)
{
- this.propertyName = propName;
- this.propertyValue = propValue;
+ this.propertyName = name;
+ this.propertyValue = defaultValue;
this.propertyType = type;
}
return prop.GetValue (container, args);
}
- public static string GetIndexedPropertyValue (object container, string expr, string format)
+ public static string GetIndexedPropertyValue (object container, string propName, string format)
{
- object result = GetIndexedPropertyValue (container, expr);
+ object result = GetIndexedPropertyValue (container, propName);
return FormatResult (result, format);
}
}
[EditorBrowsable (EditorBrowsableState.Never)]
- public override void RenderControl (HtmlTextWriter tw)
+ public override void RenderControl (HtmlTextWriter writer)
{
- base.RenderControl (tw);
+ base.RenderControl (writer);
}
[EditorBrowsable (EditorBrowsableState.Never)]
this.sortExpression = sortExpression;
}
- public DataSourceSelectArguments (int startingRowIndex, int maxRows)
+ public DataSourceSelectArguments (int startRowIndex, int maximumRows)
{
- this.startingRowIndex = startingRowIndex;
- this.maxRows = maxRows;
+ this.startingRowIndex = startRowIndex;
+ this.maxRows = maximumRows;
}
- public DataSourceSelectArguments (string sortExpression, int startingRowIndex, int maxRows)
+ public DataSourceSelectArguments (string sortExpression, int startRowIndex, int maximumRows)
{
this.sortExpression = sortExpression;
- this.startingRowIndex = startingRowIndex;
- this.maxRows = maxRows;
+ this.startingRowIndex = startRowIndex;
+ this.maxRows = maximumRows;
}
- public void AddSupportedCapabilities (DataSourceCapabilities srcCapabilities)
+ public void AddSupportedCapabilities (DataSourceCapabilities capabilities)
{
- this.dsc = this.dsc | srcCapabilities;
+ this.dsc = this.dsc | capabilities;
}
// MSDN: The DataSourceSelectArguments class overrides the Object.Equals method to test
OnDataSourceViewChanged (EventArgs.Empty);
}
- public virtual void Delete (IDictionary keys, IDictionary values,
- DataSourceViewOperationCallback callBack)
+ public virtual void Delete (IDictionary keys, IDictionary oldValues,
+ DataSourceViewOperationCallback callback)
{
- if (callBack == null)
+ if (callback == null)
throw new ArgumentNullException ("callBack");
int rowAffected;
try {
- rowAffected = ExecuteDelete (keys, values);
+ rowAffected = ExecuteDelete (keys, oldValues);
}
catch (Exception e) {
- if (!callBack (0, e))
+ if (!callback (0, e))
throw;
return;
}
- callBack (rowAffected, null);
+ callback (rowAffected, null);
}
- protected virtual int ExecuteDelete(IDictionary keys, IDictionary values)
+ protected virtual int ExecuteDelete(IDictionary keys, IDictionary oldValues)
{
throw new NotSupportedException ();
}
- protected virtual int ExecuteInsert (IDictionary keys)
+ protected virtual int ExecuteInsert (IDictionary values)
{
throw new NotSupportedException();
}
}
public virtual void Insert (IDictionary values,
- DataSourceViewOperationCallback callBack)
+ DataSourceViewOperationCallback callback)
{
- if (callBack == null)
- throw new ArgumentNullException("callBack");
+ if (callback == null)
+ throw new ArgumentNullException("callback");
int rowAffected;
try {
rowAffected = ExecuteInsert (values);
} catch (Exception e) {
- if (!callBack (0, e))
+ if (!callback (0, e))
throw;
return;
}
- callBack (rowAffected, null);
+ callback (rowAffected, null);
}
- protected virtual void OnDataSourceViewChanged (EventArgs eventArgs)
+ protected virtual void OnDataSourceViewChanged (EventArgs e)
{
if (eventsList != null) {
EventHandler evtHandler = eventsList [EventDataSourceViewChanged] as EventHandler;
if (evtHandler != null)
- evtHandler(this, eventArgs);
+ evtHandler(this, e);
}
}
return;
}
- public virtual void Select (DataSourceSelectArguments selectArgs,
- DataSourceViewSelectCallback callBack)
+ public virtual void Select (DataSourceSelectArguments arguments,
+ DataSourceViewSelectCallback callback)
{
- if (callBack == null)
+ if (callback == null)
throw new ArgumentNullException("callBack");
- selectArgs.RaiseUnsupportedCapabilitiesError (this);
+ arguments.RaiseUnsupportedCapabilitiesError (this);
- IEnumerable selectList = ExecuteSelect (selectArgs);
- callBack (selectList);
+ IEnumerable selectList = ExecuteSelect (arguments);
+ callback (selectList);
}
public virtual void Update(IDictionary keys, IDictionary values,
- IDictionary oldValues, DataSourceViewOperationCallback callBack)
+ IDictionary oldValues, DataSourceViewOperationCallback callback)
{
- if (callBack == null)
- throw new ArgumentNullException ("callBack");
+ if (callback == null)
+ throw new ArgumentNullException ("callback");
int rowAffected;
try {
rowAffected = ExecuteUpdate (keys, values, oldValues);
} catch (Exception e) {
- if (!callBack (0, e))
+ if (!callback (0, e))
throw;
return;
}
- callBack (rowAffected, null);
+ callback (rowAffected, null);
}
public virtual bool CanDelete { get { return false; } }
namespace System.Web.UI
{
- public delegate bool DataSourceViewOperationCallback (int recordsAffected, Exception exception);
+ public delegate bool DataSourceViewOperationCallback (int affectedRecords, Exception ex);
}
OnChanged (new EventArgs ());
}
- public bool Contains (string propertyName)
+ public bool Contains (string propName)
{
- return list.Contains (propertyName);
+ return list.Contains (propName);
}
public void CopyTo (Array array, int index)
list.CopyTo (array, index);
}
- public void CopyTo (ExpressionBinding [] bindings, int index)
+ public void CopyTo (ExpressionBinding [] array, int index)
{
if (index < 0)
throw new ArgumentNullException ("Index cannot be negative");
- if (index >= bindings.Length)
+ if (index >= array.Length)
throw new ArgumentException ("Index cannot be greater than or equal to length of array passed");
- if (list.Count > (bindings.Length - index + 1))
+ if (list.Count > (array.Length - index + 1))
throw new ArgumentException ("Number of elements in source is greater than available space from index to end of destination");
foreach (string key in list.Keys)
- bindings [index++] = (ExpressionBinding) list [key];
+ array [index++] = (ExpressionBinding) list [key];
}
public IEnumerator GetEnumerator ()
}
- public virtual void AddAttribute (string name, string value, bool fEncode)
+ public virtual void AddAttribute (string name, string value, bool fEndode)
{
- if (fEncode)
+ if (fEndode)
value = HttpUtility.HtmlAttributeEncode (value);
AddAttribute (name, value, GetAttributeKey (name));
b.Write (format, arg0, arg1);
}
- public override void Write (string format, params object [] args)
+ public override void Write (string format, params object [] arg)
{
OutputTabs ();
- b.Write (format, args);
+ b.Write (format, arg);
}
public override void Write (string s)
newline = true;
}
- public override void WriteLine (string format, params object [] args)
+ public override void WriteLine (string format, params object [] arg)
{
OutputTabs ();
- b.WriteLine (format, args);
+ b.WriteLine (format, arg);
newline = true;
}
}
}
- protected internal override void Render (HtmlTextWriter writer)
+ protected internal override void Render (HtmlTextWriter output)
{
- writer.Write (_text);
+ output.Write (_text);
}
protected override ControlCollection CreateControlCollection ()
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
- protected virtual void SavePageStateToPersistenceMedium (object viewState)
+ protected virtual void SavePageStateToPersistenceMedium (object state)
{
PageStatePersister persister = this.PageStatePersister;
if (persister == null)
return;
- Pair pair = viewState as Pair;
+ Pair pair = state as Pair;
if (pair != null) {
persister.ViewState = pair.First;
persister.ControlState = pair.Second;
} else
- persister.ViewState = viewState;
+ persister.ViewState = state;
persister.Save ();
}
[MonoDocumentationNote ("Not implemented. Only used by .net aspx parser")]
[EditorBrowsable (EditorBrowsableState.Never)]
- protected object GetWrappedFileDependencies (string [] list)
+ protected object GetWrappedFileDependencies (string [] virtualFileDependencies)
{
- return list;
+ return virtualFileDependencies;
}
[MonoDocumentationNote ("Does nothing. Used by .net aspx parser")]
{
}
- public virtual IHttpHandler GetHandler (HttpContext context, string requestType, string url, string path)
+ public virtual IHttpHandler GetHandler (HttpContext context, string requestType, string virtualPath, string path)
{
- return PageParser.GetCompiledPageInstance (url, path, context);
+ return PageParser.GetCompiledPageInstance (virtualPath, path, context);
}
public virtual void ReleaseHandler (IHttpHandler handler)
[Serializable]
public sealed class Pair
{
- public Pair (object first, object second)
+ public Pair (object x, object y)
{
- First = first;
- Second = second;
+ First = x;
+ Second = y;
}
public Pair ()
Type containerType;
BindingDirection direction;
- public TemplateContainerAttribute (Type containerType, BindingDirection direction)
+ public TemplateContainerAttribute (Type containerType, BindingDirection bindingDirection)
{
this.containerType = containerType;
- this.direction = direction;
+ this.direction = bindingDirection;
}
public BindingDirection BindingDirection {
return LoadControl (type, null);
}
- public Control LoadControl (Type type, object[] parameters)
+ public Control LoadControl (Type t, object[] parameters)
{
object [] attrs = null;
- if (type != null)
- type.GetCustomAttributes (typeof (PartialCachingAttribute), true);
+ if (t != null)
+ t.GetCustomAttributes (typeof (PartialCachingAttribute), true);
if (attrs != null && attrs.Length == 1) {
PartialCachingAttribute attr = (PartialCachingAttribute) attrs [0];
- PartialCachingControl ctrl = new PartialCachingControl (type, parameters);
+ PartialCachingControl ctrl = new PartialCachingControl (t, parameters);
ctrl.VaryByParams = attr.VaryByParams;
ctrl.VaryByControls = attr.VaryByControls;
ctrl.VaryByCustom = attr.VaryByCustom;
return ctrl;
}
- object control = Activator.CreateInstance (type, parameters);
+ object control = Activator.CreateInstance (t, parameters);
if (control is UserControl)
((UserControl) control).InitializeAsUserControl (Page);
return DataBinder.Eval (Page.GetDataItem(), expression, format);
}
- protected internal object XPath (string xpathexpression)
+ protected internal object XPath (string xPathExpression)
{
- return XPathBinder.Eval (Page.GetDataItem(), xpathexpression);
+ return XPathBinder.Eval (Page.GetDataItem(), xPathExpression);
}
- protected internal object XPath (string xpathexpression, IXmlNamespaceResolver resolver)
+ protected internal object XPath (string xPathExpression, IXmlNamespaceResolver resolver)
{
- return XPathBinder.Eval (Page.GetDataItem (), xpathexpression, null, resolver);
+ return XPathBinder.Eval (Page.GetDataItem (), xPathExpression, null, resolver);
}
- protected internal string XPath (string xpathexpression, string format)
+ protected internal string XPath (string xPathExpression, string format)
{
- return XPathBinder.Eval (Page.GetDataItem(), xpathexpression, format);
+ return XPathBinder.Eval (Page.GetDataItem(), xPathExpression, format);
}
- protected internal string XPath (string xpathexpression, string format, IXmlNamespaceResolver resolver)
+ protected internal string XPath (string xPathExpression, string format, IXmlNamespaceResolver resolver)
{
- return XPathBinder.Eval (Page.GetDataItem (), xpathexpression, format, resolver);
+ return XPathBinder.Eval (Page.GetDataItem (), xPathExpression, format, resolver);
}
- protected internal IEnumerable XPathSelect (string xpathexpression)
+ protected internal IEnumerable XPathSelect (string xPathExpression)
{
- return XPathBinder.Select (Page.GetDataItem(), xpathexpression);
+ return XPathBinder.Select (Page.GetDataItem(), xPathExpression);
}
- protected internal IEnumerable XPathSelect (string xpathexpression, IXmlNamespaceResolver resolver)
+ protected internal IEnumerable XPathSelect (string xPathExpression, IXmlNamespaceResolver resolver)
{
- return XPathBinder.Select (Page.GetDataItem (), xpathexpression, resolver);
+ return XPathBinder.Select (Page.GetDataItem (), xPathExpression, resolver);
}
// IFilterResolutionService
{
}
- public static object Eval (object container, string xpath)
+ public static object Eval (object container, string xPath)
{
- return Eval (container, xpath, (IXmlNamespaceResolver)null);
+ return Eval (container, xPath, (IXmlNamespaceResolver)null);
}
- public static object Eval (object container, string xpath, IXmlNamespaceResolver resolver)
+ public static object Eval (object container, string xPath, IXmlNamespaceResolver resolver)
{
- if (xpath == null || xpath.Length == 0)
- throw new ArgumentNullException ("xpath");
+ if (xPath == null || xPath.Length == 0)
+ throw new ArgumentNullException ("xPath");
IXPathNavigable factory = container as IXPathNavigable;
if (factory == null)
throw new ArgumentException ("container");
- object result = factory.CreateNavigator ().Evaluate (xpath, resolver);
+ object result = factory.CreateNavigator ().Evaluate (xPath, resolver);
XPathNodeIterator itr = result as XPathNodeIterator;
if (itr != null) {
return result;
}
- public static string Eval (object container, string xpath, string format)
+ public static string Eval (object container, string xPath, string format)
{
- return Eval (container, xpath, format, null);
+ return Eval (container, xPath, format, null);
}
- public static string Eval (object container, string xpath, string format, IXmlNamespaceResolver resolver)
+ public static string Eval (object container, string xPath, string format, IXmlNamespaceResolver resolver)
{
- object result = Eval (container, xpath, resolver);
+ object result = Eval (container, xPath, resolver);
if (result == null)
return String.Empty;
return String.Format (format, result);
}
- public static IEnumerable Select (object container, string xpath)
+ public static IEnumerable Select (object container, string xPath)
{
- return Select (container, xpath, null);
+ return Select (container, xPath, null);
}
- public static IEnumerable Select (object container, string xpath, IXmlNamespaceResolver resolver)
+ public static IEnumerable Select (object container, string xPath, IXmlNamespaceResolver resolver)
{
- if (xpath == null || xpath.Length == 0)
- throw new ArgumentNullException ("xpath");
+ if (xPath == null || xPath.Length == 0)
+ throw new ArgumentNullException ("xPath");
IXPathNavigable factory = container as IXPathNavigable;
if (factory == null)
throw new ArgumentException ("container");
- XPathNodeIterator itr = factory.CreateNavigator ().Select (xpath, resolver);
+ XPathNodeIterator itr = factory.CreateNavigator ().Select (xPath, resolver);
ArrayList ret = new ArrayList ();
while (itr.MoveNext ()) {
last_modified_from_file_dependencies = true;
}
- public void SetMaxAge (TimeSpan date)
+ public void SetMaxAge (TimeSpan delta)
{
- if (date < TimeSpan.Zero)
- throw new ArgumentOutOfRangeException ("date");
+ if (delta < TimeSpan.Zero)
+ throw new ArgumentOutOfRangeException ("delta");
- if (HaveMaxAge && MaxAge < date)
+ if (HaveMaxAge && MaxAge < delta)
return;
- MaxAge = date;
+ MaxAge = delta;
HaveMaxAge = true;
}
}
}
- public bool this [ string param ] {
+ public bool this [ string header ] {
get {
- if (param == null)
+ if (header == null)
throw new ArgumentNullException ();
- return parms.Contains (param);
+ return parms.Contains (header);
}
set {
- if (param == null)
+ if (header == null)
throw new ArgumentNullException ();
ignore_parms = false;
if (value)
- if (!parms.Contains (param))
- parms.Add (param, true);
+ if (!parms.Contains (header))
+ parms.Add (header, true);
else
- parms.Remove (param);
+ parms.Remove (header);
}
}
}
return GetLocalObjectFromFactory (virtualPath, resourceKey, culture);
}
- public object GetSection (string name)
+ public object GetSection (string sectionName)
{
- return WebConfigurationManager.GetSection (name);
+ return WebConfigurationManager.GetSection (sectionName);
}
object IServiceProvider.GetService (Type service)
return HttpContext.GetGlobalResourceObject (classKey, resourceKey, culture);
}
- public override object GetLocalResourceObject (string overridePath, string resourceKey)
+ public override object GetLocalResourceObject (string virtualPath, string resourceKey)
{
- return HttpContext.GetLocalResourceObject (overridePath, resourceKey);
+ return HttpContext.GetLocalResourceObject (virtualPath, resourceKey);
}
- public override object GetLocalResourceObject (string overridePath, string resourceKey, CultureInfo culture)
+ public override object GetLocalResourceObject (string virtualPath, string resourceKey, CultureInfo culture)
{
- return HttpContext.GetLocalResourceObject (overridePath, resourceKey, culture);
+ return HttpContext.GetLocalResourceObject (virtualPath, resourceKey, culture);
}
public override object GetSection (string sectionName)
BaseClear ();
}
- public void CopyTo (Array array, int index)
+ public void CopyTo (Array dest, int index)
{
/* XXX this is kind of gross and inefficient
* since it makes a copy of the superclass's
* list */
object[] values = BaseGetAllValues();
- values.CopyTo (array, index);
+ values.CopyTo (dest, index);
}
public string GetKey (int index)
return (HttpPostedFile)BaseGet (index);
}
- public HttpPostedFile Get (string key)
+ public HttpPostedFile Get (string name)
{
- return (HttpPostedFile)BaseGet (key);
+ return (HttpPostedFile)BaseGet (name);
}
- public HttpPostedFile this [string key] {
+ public HttpPostedFile this [string name] {
get {
- return Get (key);
+ return Get (name);
}
}
return (IHttpModule)BaseGet (index);
}
- public IHttpModule Get (string key)
+ public IHttpModule Get (string name)
{
- return (IHttpModule)BaseGet (key);
+ return (IHttpModule)BaseGet (name);
}
- public IHttpModule this [string key] {
+ public IHttpModule this [string name] {
get {
- return Get (key);
+ return Get (name);
}
}
}
[SecurityPermission (SecurityAction.Demand, SerializationFormatter = true)]
- public override void GetObjectData (SerializationInfo info, StreamingContext ctx)
+ public override void GetObjectData (SerializationInfo info, StreamingContext context)
{
- base.GetObjectData (info, ctx);
+ base.GetObjectData (info, context);
info.AddValue ("_virtualPath", virtualPath);
info.AddValue ("_parserErrors", errors);
info.AddValue ("_line", line);
w.AppendToLog (param);
}
- public override string ApplyAppPathModifier (string overridePath)
+ public override string ApplyAppPathModifier (string virtualPath)
{
- return w.ApplyAppPathModifier (overridePath);
+ return w.ApplyAppPathModifier (virtualPath);
}
public override void BinaryWrite (byte [] buffer)
buf.Add ((byte)ch);
}
- public static string UrlDecode (string s, Encoding e)
+ public static string UrlDecode (string str, Encoding e)
{
- if (null == s)
+ if (null == str)
return null;
- if (s.IndexOf ('%') == -1 && s.IndexOf ('+') == -1)
- return s;
+ if (str.IndexOf ('%') == -1 && str.IndexOf ('+') == -1)
+ return str;
if (e == null)
e = Encoding.UTF8;
- long len = s.Length;
+ long len = str.Length;
var bytes = new List <byte> ();
int xchar;
char ch;
for (int i = 0; i < len; i++) {
- ch = s [i];
- if (ch == '%' && i + 2 < len && s [i + 1] != '%') {
- if (s [i + 1] == 'u' && i + 5 < len) {
+ ch = str [i];
+ if (ch == '%' && i + 2 < len && str [i + 1] != '%') {
+ if (str [i + 1] == 'u' && i + 5 < len) {
// unicode hex sequence
- xchar = GetChar (s, i + 2, 4);
+ xchar = GetChar (str, i + 2, 4);
if (xchar != -1) {
WriteCharBytes (bytes, (char)xchar, e);
i += 5;
} else
WriteCharBytes (bytes, '%', e);
- } else if ((xchar = GetChar (s, i + 1, 2)) != -1) {
+ } else if ((xchar = GetChar (str, i + 1, 2)) != -1) {
WriteCharBytes (bytes, (char)xchar, e);
i += 2;
} else {
return UrlEncode(str, Encoding.UTF8);
}
- public static string UrlEncode (string s, Encoding Enc)
+ public static string UrlEncode (string str, Encoding e)
{
- if (s == null)
+ if (str == null)
return null;
- if (s == String.Empty)
+ if (str == String.Empty)
return String.Empty;
bool needEncode = false;
- int len = s.Length;
+ int len = str.Length;
for (int i = 0; i < len; i++) {
- char c = s [i];
+ char c = str [i];
if ((c < '0') || (c < 'A' && c > '9') || (c > 'Z' && c < 'a') || (c > 'z')) {
if (HttpEncoder.NotEncoded (c))
continue;
}
if (!needEncode)
- return s;
+ return str;
// avoided GetByteCount call
- byte [] bytes = new byte[Enc.GetMaxByteCount(s.Length)];
- int realLen = Enc.GetBytes (s, 0, s.Length, bytes, 0);
+ byte [] bytes = new byte[e.GetMaxByteCount(str.Length)];
+ int realLen = e.GetBytes (str, 0, str.Length, bytes, 0);
return Encoding.ASCII.GetString (UrlEncodeToBytes (bytes, 0, realLen));
}
return sb.ToString ();
}
- public static string UrlPathEncode (string s)
+ public static string UrlPathEncode (string str)
{
- return HttpEncoder.Current.UrlPathEncode (s);
+ return HttpEncoder.Current.UrlPathEncode (str);
}
public static NameValueCollection ParseQueryString (string query)
{
}
- public ParserErrorCollection (ParserError[] errors)
+ public ParserErrorCollection (ParserError[] value)
{
- InnerList.AddRange (errors);
+ InnerList.AddRange (value);
}
public ParserError this [int index]
set { InnerList[index] = value; }
}
- public int Add (ParserError error)
+ public int Add (ParserError value)
{
- return List.Add (error);
+ return List.Add (value);
}
- public void AddRange (ParserErrorCollection collection)
+ public void AddRange (ParserErrorCollection value)
{
- InnerList.AddRange (collection);
+ InnerList.AddRange (value);
}
- public void AddRange (ParserError[] errors)
+ public void AddRange (ParserError[] value)
{
- InnerList.AddRange (errors);
+ InnerList.AddRange (value);
}
- public bool Contains (ParserError error)
+ public bool Contains (ParserError value)
{
- return InnerList.Contains (error);
+ return InnerList.Contains (value);
}
- public void CopyTo (ParserError[] errors, int index)
+ public void CopyTo (ParserError[] array, int index)
{
- List.CopyTo (errors, index);
+ List.CopyTo (array, index);
}
- public int IndexOf (ParserError error)
+ public int IndexOf (ParserError value)
{
- return InnerList.IndexOf (error);
+ return InnerList.IndexOf (value);
}
- public void Insert (int index, ParserError error)
+ public void Insert (int index, ParserError value)
{
- InnerList.Insert (index, error);
+ InnerList.Insert (index, value);
}
- public void Remove (ParserError error)
+ public void Remove (ParserError value)
{
- InnerList.Remove (error);
+ InnerList.Remove (value);
}
}
}
return new SiteMapHierarchicalDataSourceView (this);
}
- public virtual bool IsAccessibleToUser (System.Web.HttpContext ctx)
+ public virtual bool IsAccessibleToUser (System.Web.HttpContext context)
{
- return provider.IsAccessibleToUser (ctx, this);
+ return provider.IsAccessibleToUser (context, this);
}
public override string ToString()
return node;
}
- public override bool Equals (object ob)
+ public override bool Equals (object obj)
{
- SiteMapNode node = ob as SiteMapNode;
+ SiteMapNode node = obj as SiteMapNode;
if (node == null) return false;
if (node.key != key ||
Add (value);
}
- public SiteMapNodeCollection (SiteMapNode[] values)
+ public SiteMapNodeCollection (SiteMapNode[] value)
{
- AddRangeInternal (values);
+ AddRangeInternal (value);
}
- public SiteMapNodeCollection (SiteMapNodeCollection values)
+ public SiteMapNodeCollection (SiteMapNodeCollection value)
{
- AddRangeInternal (values);
+ AddRangeInternal (value);
}
internal static SiteMapNodeCollection EmptyCollection {
remove { events.AddHandler (traceFinishedEvent, value); }
}
- public TraceContext (HttpContext Context)
+ public TraceContext (HttpContext context)
{
- _Context = Context;
+ _Context = context;
}
internal bool HaveTrace {
}
}
- public void Warn(string msg)
+ public void Warn(string message)
{
- Write (String.Empty, msg, null, true);
+ Write (String.Empty, message, null, true);
}
- public void Warn(string category, string msg)
+ public void Warn(string category, string message)
{
- Write (category, msg, null, true);
+ Write (category, message, null, true);
}
- public void Warn (string category, string msg, Exception error)
+ public void Warn (string category, string message, Exception errorInfo)
{
- Write (category, msg, error, true);
+ Write (category, message, errorInfo, true);
}
- public void Write (string msg)
+ public void Write (string message)
{
- Write (String.Empty, msg, null, false);
+ Write (String.Empty, message, null, false);
}
- public void Write (string category, string msg)
+ public void Write (string category, string message)
{
- Write (category, msg, null, false);
+ Write (category, message, null, false);
}
- public void Write (string category, string msg, Exception error)
+ public void Write (string category, string message, Exception errorInfo)
{
- Write (category, msg, error, false);
+ Write (category, message, errorInfo, false);
}
void Write (string category, string msg, Exception error, bool Warning)
-//
+//
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
// Francis Fisher (frankie@terrorise.me.uk)
}
}
[MonoTODO]
- public string this[string propName] {
+ public string this[string name] {
get {
throw new NotImplementedException ();
}
}
#endif
- public override bool Equals (object other)
+ public override bool Equals (object obj)
{
- var cwa = other as ContentWrapperAttribute;
+ var cwa = obj as ContentWrapperAttribute;
if (cwa == null)
return false;
return ContentWrapper != null ? ContentWrapper == cwa.ContentWrapper : cwa.ContentWrapper == null;
static readonly char [] comma_or_parens = new char [] {',', '(', ')'};
- public static bool TryParseList (string typeNameList, IXamlNamespaceResolver namespaceResolver, out IList<XamlTypeName> list)
+ public static bool TryParseList (string typeNameList, IXamlNamespaceResolver namespaceResolver, out IList<XamlTypeName> result)
{
if (typeNameList == null)
throw new ArgumentNullException ("typeNameList");
if (namespaceResolver == null)
throw new ArgumentNullException ("namespaceResolver");
- list = null;
+ result = null;
int idx = 0;
int parens = 0;
XamlTypeName tn;
ret.Add (tn);
}
- list = ret;
+ result = ret;
return true;
}
public XamlType TargetType { get; private set; }
- public static bool operator == (XamlValueConverter<TConverterBase> left, XamlValueConverter<TConverterBase> right)
+ public static bool operator == (XamlValueConverter<TConverterBase> converter1, XamlValueConverter<TConverterBase> converter2)
{
- return IsNull (left) ? IsNull (right) : left.Equals (right);
+ return IsNull (converter1) ? IsNull (converter2) : converter1.Equals (converter2);
}
static bool IsNull (XamlValueConverter<TConverterBase> a)
return Object.ReferenceEquals (a, null);
}
- public static bool operator != (XamlValueConverter<TConverterBase> left, XamlValueConverter<TConverterBase> right)
+ public static bool operator != (XamlValueConverter<TConverterBase> converter1, XamlValueConverter<TConverterBase> converter2)
{
- return IsNull (left) ? !IsNull (right) : IsNull (right) || left.ConverterType != right.ConverterType || left.TargetType != right.TargetType || left.Name != right.Name;
+ return IsNull (converter1) ? !IsNull (converter2) : IsNull (converter2) || converter1.ConverterType != converter2.ConverterType || converter1.TargetType != converter2.TargetType || converter1.Name != converter2.Name;
}
public bool Equals (XamlValueConverter<TConverterBase> other)
get { return LookupValueSerializer (); }
}
- public static bool operator == (XamlMember left, XamlMember right)
+ public static bool operator == (XamlMember xamlMember1, XamlMember xamlMember2)
{
- return IsNull (left) ? IsNull (right) : left.Equals (right);
+ return IsNull (xamlMember1) ? IsNull (xamlMember2) : xamlMember1.Equals (xamlMember2);
}
static bool IsNull (XamlMember a)
return Object.ReferenceEquals (a, null);
}
- public static bool operator != (XamlMember left, XamlMember right)
+ public static bool operator != (XamlMember xamlMember1, XamlMember xamlMember2)
{
- return !(left == right);
+ return !(xamlMember1 == xamlMember2);
}
- public override bool Equals (object other)
+ public override bool Equals (object obj)
{
- var x = other as XamlMember;
+ var x = obj as XamlMember;
return Equals (x);
}
Save (xw, instance);
}
- public static void Save (TextWriter textWriter, object instance)
+ public static void Save (TextWriter writer, object instance)
{
- using (var xw = XmlWriter.Create (textWriter, new XmlWriterSettings () { OmitXmlDeclaration = true, Indent = true }))
+ using (var xw = XmlWriter.Create (writer, new XmlWriterSettings () { OmitXmlDeclaration = true, Indent = true }))
Save (xw, instance);
}
- public static void Save (XmlWriter xmlWriter, object instance)
+ public static void Save (XmlWriter writer, object instance)
{
- Save (new XamlXmlWriter (xmlWriter, new XamlSchemaContext ()), instance);
+ Save (new XamlXmlWriter (writer, new XamlSchemaContext ()), instance);
}
- public static void Save (XamlWriter xamlWriter, object instance)
+ public static void Save (XamlWriter writer, object instance)
{
- if (xamlWriter == null)
- throw new ArgumentNullException ("xamlWriter");
- var r = new XamlObjectReader (instance, xamlWriter.SchemaContext);
- Transform (r, xamlWriter);
+ if (writer == null)
+ throw new ArgumentNullException ("writer");
+ var r = new XamlObjectReader (instance, writer.SchemaContext);
+ Transform (r, writer);
}
public static void Transform (XamlReader xamlReader, XamlWriter xamlWriter)
return stn != null ? stn.Name : Name;
}
- public static bool operator == (XamlType left, XamlType right)
+ public static bool operator == (XamlType xamlType1, XamlType xamlType2)
{
- return IsNull (left) ? IsNull (right) : left.Equals (right);
+ return IsNull (xamlType1) ? IsNull (xamlType2) : xamlType1.Equals (xamlType2);
}
static bool IsNull (XamlType a)
return Object.ReferenceEquals (a, null);
}
- public static bool operator != (XamlType left, XamlType right)
+ public static bool operator != (XamlType xamlType1, XamlType xamlType2)
{
- return !(left == right);
+ return !(xamlType1 == xamlType2);
}
public bool Equals (XamlType other)
intl.WriteNamespace (namespaceDeclaration);
}
- public override void WriteStartObject (XamlType xamlType)
+ public override void WriteStartObject (XamlType type)
{
- intl.WriteStartObject (xamlType);
+ intl.WriteStartObject (type);
}
public override void WriteValue (object value)
return new ConfigXmlCDataSection (this, data);
}
- public override XmlComment CreateComment (string comment)
+ public override XmlComment CreateComment (string data)
{
- return new ConfigXmlComment (this, comment);
+ return new ConfigXmlComment (this, data);
}
public override XmlElement CreateElement (string prefix, string localName, string namespaceUri)
get { return properties; }
}
- public override bool Equals (object o)
+ public override bool Equals (object settings)
{
- SettingElement e = o as SettingElement;
+ SettingElement e = settings as SettingElement;
if (e == null)
return false;
{
SpecialSetting setting;
- public SpecialSettingAttribute (SpecialSetting setting)
+ public SpecialSettingAttribute (SpecialSetting specialSetting)
{
- this.setting = setting;
+ this.setting = specialSetting;
}
public SpecialSetting SpecialSetting {
return CounterSampleCalculator.ComputeCounterValue (counterSample, nextCounterSample);
}
- public override bool Equals (object obj)
+ public override bool Equals (object o)
{
- if (!(obj is CounterSample))
+ if (!(o is CounterSample))
return false;
- return Equals ((CounterSample) obj);
+ return Equals ((CounterSample) o);
}
- public bool Equals (CounterSample other)
+ public bool Equals (CounterSample sample)
{
return
- rawValue == other.rawValue &&
- baseValue == other.counterFrequency &&
- counterFrequency == other.counterFrequency &&
- systemFrequency == other.systemFrequency &&
- timeStamp == other.timeStamp &&
- timeStamp100nSec == other.timeStamp100nSec &&
- counterTimeStamp == other.counterTimeStamp &&
- counterType == other.counterType;
+ rawValue == sample.rawValue &&
+ baseValue == sample.counterFrequency &&
+ counterFrequency == sample.counterFrequency &&
+ systemFrequency == sample.systemFrequency &&
+ timeStamp == sample.timeStamp &&
+ timeStamp100nSec == sample.timeStamp100nSec &&
+ counterTimeStamp == sample.counterTimeStamp &&
+ counterType == sample.counterType;
}
- public static bool operator == (CounterSample obj1, CounterSample obj2)
+ public static bool operator == (CounterSample a, CounterSample b)
{
- return obj1.Equals (obj2);
+ return a.Equals (b);
}
- public static bool operator != (CounterSample obj1, CounterSample obj2)
+ public static bool operator != (CounterSample a, CounterSample b)
{
- return !obj1.Equals (obj2);
+ return !a.Equals (b);
}
public override int GetHashCode ()
get { return this; }
}
- public void CopyTo (EventLogEntry[] eventLogEntries, int index)
+ public void CopyTo (EventLogEntry[] entries, int index)
{
- EventLogEntry[] entries = _impl.GetEntries ();
- Array.Copy (entries, 0, eventLogEntries, index, entries.Length);
+ EventLogEntry[] evLogEntries = _impl.GetEntries ();
+ Array.Copy (evLogEntries, 0, entries, index, evLogEntries.Length);
}
public IEnumerator GetEnumerator ()
[ComVisible (false)]
public override void TraceData (TraceEventCache eventCache,
- string source, TraceEventType eventType,
+ string source, TraceEventType severity,
int id, object data)
{
EventLogEntryType type;
- switch (eventType) {
+ switch (severity) {
case TraceEventType.Critical:
case TraceEventType.Error:
type = EventLogEntryType.Error;
[ComVisible (false)]
public override void TraceData (TraceEventCache eventCache,
- string source, TraceEventType eventType,
+ string source, TraceEventType severity,
int id, params object [] data)
{
string s = String.Empty;
arr [i] = data [i] != null ? data [i].ToString () : String.Empty;
s = String.Join (", ", arr);
}
- TraceData (eventCache, source, eventType, id, s);
+ TraceData (eventCache, source, severity, id, s);
}
[ComVisible (false)]
public override void TraceEvent (TraceEventCache eventCache,
- string source, TraceEventType eventType,
+ string source, TraceEventType severity,
int id, string message)
{
- TraceData (eventCache, source, eventType, id, message);
+ TraceData (eventCache, source, severity, id, message);
}
[ComVisible (false)]
public override void TraceEvent (TraceEventCache eventCache,
- string source, TraceEventType eventType,
+ string source, TraceEventType severity,
int id, string format, params object [] args)
{
- TraceEvent (eventCache, source, eventType, id, format != null ? String.Format (format, args) : null);
+ TraceEvent (eventCache, source, severity, id, format != null ? String.Format (format, args) : null);
}
}
}
}
[Obsolete ("Process.Start is not supported on the current platform.", true)]
- public static Process Start(string fileName, string username, SecureString password, string domain)
+ public static Process Start(string fileName, string userName, SecureString password, string domain)
{
throw new PlatformNotSupportedException ("Process.Start is not supported on the current platform.");
}
[Obsolete ("Process.Start is not supported on the current platform.", true)]
- public static Process Start(string fileName, string arguments, string username, SecureString password, string domain)
+ public static Process Start(string fileName, string arguments, string userName, SecureString password, string domain)
{
throw new PlatformNotSupportedException ("Process.Start is not supported on the current platform.");
}
}
}
- public override IAsyncResult BeginRead (byte [] buffer, int offset, int count,
- AsyncCallback cback, object state)
+ public override IAsyncResult BeginRead (byte [] array, int offset, int count,
+ AsyncCallback asyncCallback, object asyncState)
{
if (disposed)
throw new ObjectDisposedException (GetType ().FullName);
if (!CanRead)
throw new NotSupportedException ("This stream does not support reading");
- if (buffer == null)
- throw new ArgumentNullException ("buffer");
+ if (array == null)
+ throw new ArgumentNullException ("array");
if (count < 0)
throw new ArgumentOutOfRangeException ("count", "Must be >= 0");
if (offset < 0)
throw new ArgumentOutOfRangeException ("offset", "Must be >= 0");
- if (count + offset > buffer.Length)
+ if (count + offset > array.Length)
throw new ArgumentException ("Buffer too small. count/offset wrong.");
ReadMethod r = new ReadMethod (ReadInternal);
- return r.BeginInvoke (buffer, offset, count, cback, state);
+ return r.BeginInvoke (array, offset, count, asyncCallback, asyncState);
}
- public override IAsyncResult BeginWrite (byte [] buffer, int offset, int count,
- AsyncCallback cback, object state)
+ public override IAsyncResult BeginWrite (byte [] array, int offset, int count,
+ AsyncCallback asyncCallback, object asyncState)
{
if (disposed)
throw new ObjectDisposedException (GetType ().FullName);
if (!CanWrite)
throw new InvalidOperationException ("This stream does not support writing");
- if (buffer == null)
- throw new ArgumentNullException ("buffer");
+ if (array == null)
+ throw new ArgumentNullException ("array");
if (count < 0)
throw new ArgumentOutOfRangeException ("count", "Must be >= 0");
if (offset < 0)
throw new ArgumentOutOfRangeException ("offset", "Must be >= 0");
- if (count + offset > buffer.Length)
+ if (count + offset > array.Length)
throw new ArgumentException ("Buffer too small. count/offset wrong.");
WriteMethod w = new WriteMethod (WriteInternal);
- return w.BeginInvoke (buffer, offset, count, cback, state);
+ return w.BeginInvoke (array, offset, count, asyncCallback, asyncState);
}
- public override int EndRead(IAsyncResult async_result)
+ public override int EndRead(IAsyncResult asyncResult)
{
- if (async_result == null)
- throw new ArgumentNullException ("async_result");
+ if (asyncResult == null)
+ throw new ArgumentNullException ("asyncResult");
- AsyncResult ares = async_result as AsyncResult;
+ AsyncResult ares = asyncResult as AsyncResult;
if (ares == null)
- throw new ArgumentException ("Invalid IAsyncResult", "async_result");
+ throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
ReadMethod r = ares.AsyncDelegate as ReadMethod;
if (r == null)
- throw new ArgumentException ("Invalid IAsyncResult", "async_result");
+ throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
- return r.EndInvoke (async_result);
+ return r.EndInvoke (asyncResult);
}
- public override void EndWrite (IAsyncResult async_result)
+ public override void EndWrite (IAsyncResult asyncResult)
{
- if (async_result == null)
- throw new ArgumentNullException ("async_result");
+ if (asyncResult == null)
+ throw new ArgumentNullException ("asyncResult");
- AsyncResult ares = async_result as AsyncResult;
+ AsyncResult ares = asyncResult as AsyncResult;
if (ares == null)
- throw new ArgumentException ("Invalid IAsyncResult", "async_result");
+ throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
WriteMethod w = ares.AsyncDelegate as WriteMethod;
if (w == null)
- throw new ArgumentException ("Invalid IAsyncResult", "async_result");
+ throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
- w.EndInvoke (async_result);
+ w.EndInvoke (asyncResult);
return;
}
return encoding.GetString (seen.ToArray ());
}
- public void Write (string str)
+ public void Write (string text)
{
CheckOpen ();
- if (str == null)
- throw new ArgumentNullException ("str");
+ if (text == null)
+ throw new ArgumentNullException ("text");
- byte [] buffer = encoding.GetBytes (str);
+ byte [] buffer = encoding.GetBytes (text);
Write (buffer, 0, buffer.Length);
}
stream.Write (bytes, 0, bytes.Length);
}
- public void WriteLine (string str)
+ public void WriteLine (string text)
{
- Write (str + new_line);
+ Write (text + new_line);
}
void CheckOpen ()
return av;
}
- public static AlternateView CreateAlternateViewFromString (string content, Encoding encoding, string mediaType)
+ public static AlternateView CreateAlternateViewFromString (string content, Encoding contentEncoding, string mediaType)
{
if (content == null)
throw new ArgumentNullException ("content");
- if (encoding == null)
- encoding = Encoding.UTF8;
- MemoryStream ms = new MemoryStream (encoding.GetBytes (content));
+ if (contentEncoding == null)
+ contentEncoding = Encoding.UTF8;
+ MemoryStream ms = new MemoryStream (contentEncoding.GetBytes (content));
ContentType ct = new ContentType ();
ct.MediaType = mediaType;
- ct.CharSet = encoding.HeaderName;
+ ct.CharSet = contentEncoding.HeaderName;
AlternateView av = new AlternateView (ms, ct);
av.TransferEncoding = TransferEncoding.QuotedPrintable;
return av;
#region Methods
- public override bool Equals (object obj)
+ public override bool Equals (object value)
{
- if (obj == null)
+ if (value == null)
return false;
- return (0 == String.Compare (ToString (), obj.ToString (), StringComparison.OrdinalIgnoreCase));
+ return (0 == String.Compare (ToString (), value.ToString (), StringComparison.OrdinalIgnoreCase));
}
public override int GetHashCode ()
}
}
- public void Send (string from, string to, string subject, string body)
+ public void Send (string from, string recipients, string subject, string body)
{
- Send (new MailMessage (from, to, subject, body));
+ Send (new MailMessage (from, recipients, subject, body));
}
public Task SendMailAsync (MailMessage message)
worker.RunWorkerAsync (userToken);
}
- public void SendAsync (string from, string to, string subject, string body, object userToken)
+ public void SendAsync (string from, string recipients, string subject, string body, object userToken)
{
- SendAsync (new MailMessage (from, to, subject, body), userToken);
+ SendAsync (new MailMessage (from, recipients, subject, body), userToken);
}
public void SendAsyncCancel ()
{
}
- protected SmtpException (SerializationInfo info, StreamingContext context)
- : base (info, context)
+ protected SmtpException (SerializationInfo serializationInfo, StreamingContext streamingContext)
+ : base (serializationInfo, streamingContext)
{
try {
- statusCode = (SmtpStatusCode) info.GetValue ("Status", typeof (int));
+ statusCode = (SmtpStatusCode) serializationInfo.GetValue ("Status", typeof (int));
} catch (SerializationException) {
//For compliance with previously serialized version:
- statusCode = (SmtpStatusCode) info.GetValue ("statusCode", typeof (SmtpStatusCode));
+ statusCode = (SmtpStatusCode) serializationInfo.GetValue ("statusCode", typeof (SmtpStatusCode));
}
}
#endregion // Properties
- public override void GetObjectData (SerializationInfo info, StreamingContext context)
+ public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
{
- if (info == null)
- throw new ArgumentNullException ("info");
- base.GetObjectData (info, context);
- info.AddValue ("Status", statusCode, typeof (int));
+ if (serializationInfo == null)
+ throw new ArgumentNullException ("serializationInfo");
+ base.GetObjectData (serializationInfo, streamingContext);
+ serializationInfo.AddValue ("Status", statusCode, typeof (int));
}
void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
{
{
}
- protected SmtpFailedRecipientException (SerializationInfo serializationInfo, StreamingContext streamingContext)
- : base (serializationInfo, streamingContext)
+ protected SmtpFailedRecipientException (SerializationInfo info, StreamingContext context)
+ : base (info, context)
{
- if (serializationInfo == null)
- throw new ArgumentNullException ("serializationInfo");
- failedRecipient = serializationInfo.GetString ("failedRecipient");
+ if (info == null)
+ throw new ArgumentNullException ("info");
+ failedRecipient = info.GetString ("failedRecipient");
}
public SmtpFailedRecipientException (SmtpStatusCode statusCode, string failedRecipient) : base (statusCode)
#region Methods
- public override void GetObjectData (SerializationInfo info, StreamingContext context)
+ public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
{
- if (info == null)
- throw new ArgumentNullException ("info");
- base.GetObjectData (info, context);
- info.AddValue ("innerExceptions", innerExceptions);
+ if (serializationInfo == null)
+ throw new ArgumentNullException ("serializationInfo");
+ base.GetObjectData (serializationInfo, streamingContext);
+ serializationInfo.AddValue ("innerExceptions", innerExceptions);
}
void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
sockares.Complete (acc_socket, total);
});
- public Socket EndAccept (IAsyncResult result)
+ public Socket EndAccept (IAsyncResult asyncResult)
{
int bytes;
byte[] buffer;
- return EndAccept (out buffer, out bytes, result);
+ return EndAccept (out buffer, out bytes, asyncResult);
}
public Socket EndAccept (out byte[] buffer, out int bytesTransferred, IAsyncResult asyncResult)
}
});
- public IAsyncResult BeginConnect (string host, int port, AsyncCallback callback, object state)
+ public IAsyncResult BeginConnect (string host, int port, AsyncCallback requestCallback, object state)
{
ThrowIfDisposedAndClosed ();
if (is_listening)
throw new InvalidOperationException ();
- return BeginConnect (Dns.GetHostAddresses (host), port, callback, state);
+ return BeginConnect (Dns.GetHostAddresses (host), port, requestCallback, state);
}
- public IAsyncResult BeginConnect (EndPoint end_point, AsyncCallback callback, object state)
+ public IAsyncResult BeginConnect (EndPoint remoteEP, AsyncCallback callback, object state)
{
ThrowIfDisposedAndClosed ();
- if (end_point == null)
- throw new ArgumentNullException ("end_point");
+ if (remoteEP == null)
+ throw new ArgumentNullException ("remoteEP");
if (is_listening)
throw new InvalidOperationException ();
SocketAsyncResult sockares = new SocketAsyncResult (this, callback, state, SocketOperation.Connect) {
- EndPoint = end_point,
+ EndPoint = remoteEP,
};
// Bug #75154: Connect() should not succeed for .Any addresses.
- if (end_point is IPEndPoint) {
- IPEndPoint ep = (IPEndPoint) end_point;
+ if (remoteEP is IPEndPoint) {
+ IPEndPoint ep = (IPEndPoint) remoteEP;
if (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any)) {
sockares.Complete (new SocketException ((int) SocketError.AddressNotAvailable), true);
return sockares;
}
- end_point = RemapIPEndPoint (ep);
+ remoteEP = RemapIPEndPoint (ep);
}
int error = 0;
bool blk = is_blocking;
if (blk)
Blocking = false;
- Connect_internal (m_Handle, end_point.Serialize (), out error, false);
+ Connect_internal (m_Handle, remoteEP.Serialize (), out error, false);
if (blk)
Blocking = true;
return sockares;
}
- public IAsyncResult BeginConnect (IPAddress[] addresses, int port, AsyncCallback callback, object state)
+ public IAsyncResult BeginConnect (IPAddress[] addresses, int port, AsyncCallback requestCallback, object state)
{
ThrowIfDisposedAndClosed ();
if (is_listening)
throw new InvalidOperationException ();
- SocketAsyncResult sockares = new SocketAsyncResult (this, callback, state, SocketOperation.Connect) {
+ SocketAsyncResult sockares = new SocketAsyncResult (this, requestCallback, state, SocketOperation.Connect) {
Addresses = addresses,
Port = port,
};
}
});
- public void EndConnect (IAsyncResult result)
+ public void EndConnect (IAsyncResult asyncResult)
{
ThrowIfDisposedAndClosed ();
- SocketAsyncResult sockares = ValidateEndIAsyncResult (result, "EndConnect", "result");
+ SocketAsyncResult sockares = ValidateEndIAsyncResult (asyncResult, "EndConnect", "asyncResult");
if (!sockares.IsCompleted)
sockares.AsyncWaitHandle.WaitOne();
}
});
- public IAsyncResult BeginReceiveFrom (byte[] buffer, int offset, int size, SocketFlags socket_flags, ref EndPoint remote_end, AsyncCallback callback, object state)
+ public IAsyncResult BeginReceiveFrom (byte[] buffer, int offset, int size, SocketFlags socketFlags, ref EndPoint remoteEP, AsyncCallback callback, object state)
{
ThrowIfDisposedAndClosed ();
ThrowIfBufferNull (buffer);
ThrowIfBufferOutOfRange (buffer, offset, size);
- if (remote_end == null)
- throw new ArgumentNullException ("remote_end");
+ if (remoteEP == null)
+ throw new ArgumentNullException ("remoteEP");
SocketAsyncResult sockares = new SocketAsyncResult (this, callback, state, SocketOperation.ReceiveFrom) {
Buffer = buffer,
Offset = offset,
Size = size,
- SockFlags = socket_flags,
- EndPoint = remote_end,
+ SockFlags = socketFlags,
+ EndPoint = remoteEP,
};
QueueIOSelectorJob (ReadSem, sockares.Handle, new IOSelectorJob (IOOperation.Read, BeginReceiveFromCallback, sockares));
sockares.Complete (total);
});
- public int EndReceiveFrom(IAsyncResult result, ref EndPoint end_point)
+ public int EndReceiveFrom(IAsyncResult asyncResult, ref EndPoint endPoint)
{
ThrowIfDisposedAndClosed ();
- if (end_point == null)
- throw new ArgumentNullException ("remote_end");
+ if (endPoint == null)
+ throw new ArgumentNullException ("endPoint");
- SocketAsyncResult sockares = ValidateEndIAsyncResult (result, "EndReceiveFrom", "result");
+ SocketAsyncResult sockares = ValidateEndIAsyncResult (asyncResult, "EndReceiveFrom", "asyncResult");
if (!sockares.IsCompleted)
sockares.AsyncWaitHandle.WaitOne();
sockares.CheckIfThrowDelayedException();
- end_point = sockares.EndPoint;
+ endPoint = sockares.EndPoint;
return sockares.Total;
}
}
});
- public IAsyncResult BeginSendTo(byte[] buffer, int offset, int size, SocketFlags socket_flags, EndPoint remote_end, AsyncCallback callback, object state)
+ public IAsyncResult BeginSendTo(byte[] buffer, int offset, int size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback callback, object state)
{
ThrowIfDisposedAndClosed ();
ThrowIfBufferNull (buffer);
Buffer = buffer,
Offset = offset,
Size = size,
- SockFlags = socket_flags,
- EndPoint = remote_end,
+ SockFlags = socketFlags,
+ EndPoint = remoteEP,
};
QueueIOSelectorJob (WriteSem, sockares.Handle, new IOSelectorJob (IOOperation.Write, s => BeginSendToCallback ((SocketAsyncResult) s, 0), sockares));
sockares.Complete ();
}
- public int EndSendTo (IAsyncResult result)
+ public int EndSendTo (IAsyncResult asyncResult)
{
ThrowIfDisposedAndClosed ();
- SocketAsyncResult sockares = ValidateEndIAsyncResult (result, "EndSendTo", "result");
+ SocketAsyncResult sockares = ValidateEndIAsyncResult (asyncResult, "EndSendTo", "result");
if (!sockares.IsCompleted)
sockares.AsyncWaitHandle.WaitOne();
return result.Response;
}
- public Stream EndGetRequestStream (IAsyncResult asyncResult, out TransportContext transportContext)
+ public Stream EndGetRequestStream (IAsyncResult asyncResult, out TransportContext context)
{
- transportContext = null;
+ context = null;
return EndGetRequestStream (asyncResult);
}
_flags = StorePermissionFlags.NoFlags;
}
- public StorePermission (StorePermissionFlags flags)
+ public StorePermission (StorePermissionFlags flag)
{
// reuse validation by the Flags property
- Flags = flags;
+ Flags = flag;
}
return ((_flags & ~dp._flags) == 0);
}
- public override void FromXml (SecurityElement e)
+ public override void FromXml (SecurityElement securityElement)
{
// General validation in CodeAccessPermission
- PermissionHelper.CheckSecurityElement (e, "e", version, version);
+ PermissionHelper.CheckSecurityElement (securityElement, "securityElement", version, version);
// Note: we do not (yet) care about the return value
// as we only accept version 1 (min/max values)
- string s = e.Attribute ("Flags");
+ string s = securityElement.Attribute ("Flags");
if (s == null)
_flags = StorePermissionFlags.NoFlags;
else
Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
- Assert.AreEqual ("info", ex.ParamName, "#5");
+ Assert.AreEqual ("serializationInfo", ex.ParamName, "#5");
}
}
}
class MySmtpException : SmtpException {
- public MySmtpException (SerializationInfo info, StreamingContext context)
- : base (info, context)
+ public MySmtpException (SerializationInfo serializationInfo, StreamingContext streamingContext)
+ : base (serializationInfo, streamingContext)
{
}
}
namespace System.ComponentModel {
- public delegate void CurrentChangingEventHandler (object sender, CurrentChangingEventArgs args);
+ public delegate void CurrentChangingEventHandler (object sender, CurrentChangingEventArgs e);
}
public static partial class Environment {
/*
- * This is the version number of the corlib-runtime interface. When
- * making changes to this interface (by changing the layout
- * of classes the runtime knows about, changing icall signature or
- * semantics etc), increment this variable. Also increment the
- * pair of this variable in the runtime in metadata/appdomain.c.
- * Changes which are already detected at runtime, like the addition
- * of icalls, do not require an increment.
+ * This is the version number of the corlib-runtime interface.
+ * It is defined in configure.ac.
*/
#pragma warning disable 169
- private const int mono_corlib_version = 164;
+ private const int mono_corlib_version = Consts.MonoCorlibVersion;
#pragma warning restore 169
[ComVisible (true)]
return;
}
}
- if (index == 2) {
- if (zero) {
- offset = lens [0] + lens [1] + 2;
- length = format.Length - offset;
- return;
- }
- if (positive) {
- offset = 0;
- length = lens [0];
- return;
- }
- if (lens [1] > 0) {
- positive = true;
- offset = lens [0] + 1;
- length = lens [1];
+ if (zero) {
+ if (index == 2) {
+ if (format.Length - lastPos == 0) {
+ offset = 0;
+ length = lens [0];
+ } else {
+ offset = lens [0] + lens [1] + 2;
+ length = format.Length - offset;
+ }
return;
}
- else {
+
+ if (lens [2] == 0) {
offset = 0;
length = lens [0];
- return;
- }
- }
- if (index == 3) {
- if (zero) {
+ } else {
offset = lens [0] + lens [1] + 2;
length = lens [2];
- return;
- }
- if (positive) {
- offset = 0;
- length = lens [0];
- return;
- }
- if (lens [1] > 0) {
- positive = true;
- offset = lens [0] + 1;
- length = lens [1];
- return;
- }
- else {
- offset = 0;
- length = lens [0];
- return;
}
- }
- throw new ArgumentException ();
+ return;
+
+ }
+ if (positive) {
+ offset = 0;
+ length = lens [0];
+ return;
+ }
+ if (lens [1] > 0) {
+ positive = true;
+ offset = lens [0] + 1;
+ length = lens [1];
+ return;
+ }
+ offset = 0;
+ length = lens [0];
}
public static CustomInfo Parse (string format, int offset, int length, NumberFormatInfo nfi)
int hundred = 100;
int neghund = -100;
- Assert.IsTrue ( hundred.ToString ("#;#") == "100", "#TS1");
- Assert.IsTrue ( hundred.ToString ("-#;#") == "-100", "#TS2");
- Assert.IsTrue ( neghund.ToString ("#;#") == "100", "#TS3");
- Assert.IsTrue ( neghund.ToString ("#;-#") == "-100", "#TS3");
+ Assert.AreEqual ("100", hundred.ToString ("#;#"), "#TS1");
+ Assert.AreEqual ("-100", hundred.ToString ("-#;#"), "#TS2");
+ Assert.AreEqual ("100", neghund.ToString ("#;#"), "#TS3");
+ Assert.AreEqual ("-100", neghund.ToString ("#;-#"), "#TS4");
+ Assert.AreEqual ("3", 0.ToString ("3;;"), "#TS5");
+ Assert.AreEqual ("3", 0.ToString ("3;2;"), "#TS6");
+ Assert.AreEqual ("3", 0.ToString ("3;"), "#TS7");
+ Assert.AreEqual ("3", 0.ToString ("3;;;;;;;"), "#TS8");
}
[Test]
if (ca.Count != 1)
break;
+ if (mapping == null)
+ mapping = new Dictionary<string, object> (StringComparer.Ordinal);
+
if (constructor.Parameters[0].ParameterType == constructor.Module.TypeSystem.Boolean) {
- if (mapping == null)
- mapping = new Dictionary<string, object> (StringComparer.Ordinal);
mapping.Add ("Bindable", ca[0].Value);
+ } else if (constructor.Parameters[0].ParameterType.FullName == "System.ComponentModel.BindableSupport") {
+ if ((int)ca[0].Value == 0)
+ mapping.Add ("Bindable", false);
+ else if ((int)ca[0].Value == 1)
+ mapping.Add ("Bindable", true);
+ else
+ throw new NotImplementedException ();
} else {
throw new NotImplementedException ();
}
LOCAL_MCS_FLAGS =
LIB_REFS = Mono.Cecil Mono.Cecil.Mdb
+NO_INSTALL = yes
+
include ../../build/executable.make
data/Microsoft.VisualBasic.targets \
data/MSBuild/Microsoft.Build.CommonTypes.xsd \
data/MSBuild/Microsoft.Build.Core.xsd \
- data/Portable/Targets/* \
- data/Portable/Frameworks/v5.0/* \
+ data/Portable/Targets/Microsoft.Portable.Core.props \
+ data/Portable/Targets/Microsoft.Portable.Core.targets \
+ data/Portable/Targets/v4.0/Microsoft.Portable.Common.targets \
+ data/Portable/Targets/v4.0/Microsoft.Portable.CSharp.targets \
+ data/Portable/Targets/v4.0/Microsoft.Portable.VisualBasic.targets \
+ data/Portable/Targets/v4.5/Microsoft.Portable.Common.targets \
+ data/Portable/Targets/v4.5/Microsoft.Portable.CSharp.targets \
+ data/Portable/Targets/v4.5/Microsoft.Portable.VisualBasic.targets \
+ data/Portable/Targets/v4.6/Microsoft.Portable.Common.targets \
+ data/Portable/Targets/v4.6/Microsoft.Portable.CSharp.targets \
+ data/Portable/Targets/v4.6/Microsoft.Portable.VisualBasic.targets \
+ data/Portable/Targets/v5.0/Microsoft.Portable.Common.targets \
+ data/Portable/Targets/v5.0/Microsoft.Portable.CSharp.targets \
+ data/Portable/Targets/v5.0/Microsoft.Portable.VisualBasic.targets \
+ "data/Portable/Frameworks/v5.0/.NET Framework 4.6.xml" \
+ "data/Portable/Frameworks/v5.0/ASP.NET Core 1.0.xml" \
+ "data/Portable/Frameworks/v5.0/FrameworkList.xml" \
+ "data/Portable/Frameworks/v5.0/Windows Universal 10.0.xml" \
frameworks/net_2.0.xml \
frameworks/net_3.0.xml \
frameworks/net_3.5.xml \
#include <direct.h>
#endif
-/*
- * This is the version number of the corlib-runtime interface. When
- * making changes to this interface (by changing the layout
- * of classes the runtime knows about, changing icall signature or
- * semantics etc), increment this variable. Also increment the
- * pair of this variable in mscorlib in:
- * mcs/class/corlib/System/Environment.cs
- *
- * Changes which are already detected at runtime, like the addition
- * of icalls, do not require an increment.
- */
-#define MONO_CORLIB_VERSION 164
-
typedef struct
{
int runtime_count;
if (!ht) {
ht = g_hash_table_new (mono_aligned_addr_hash, NULL);
destroy_ht = TRUE;
+ for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
+ g_hash_table_insert (ht, tmp->data, tmp->data);
+ }
}
/* FIXME: handle lazy loaded assemblies */
- for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
- g_hash_table_insert (ht, tmp->data, tmp->data);
- }
+
if (!g_hash_table_lookup (ht, ass)) {
mono_assembly_addref (ass);
g_hash_table_insert (ht, ass, ass);
}
if (ass->image->references) {
- for (i = 0; ass->image->references [i] != NULL; i++) {
- if (ass->image->references [i] != REFERENCE_MISSING)
+ for (i = 0; i < ass->image->nreferences; i++) {
+ if (ass->image->references[i] && ass->image->references [i] != REFERENCE_MISSING) {
if (!g_hash_table_lookup (ht, ass->image->references [i])) {
add_assemblies_to_domain (domain, ass->image->references [i], ht);
}
+ }
}
}
if (destroy_ht)
if (!domain)
return;
+ if (info->has_new_version && mono_assembly_is_problematic_version (info->name, info->new_version.major, info->new_version.minor, info->new_version.build, info->new_version.revision)) {
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Discarding assembly binding to problematic version %s v%d.%d.%d.%d",
+ info->name, info->new_version.major, info->new_version.minor, info->new_version.build, info->new_version.revision);
+ return;
+ }
+
for (tmp = domain->assembly_bindings; tmp; tmp = tmp->next) {
info_tmp = (MonoAssemblyBindingInfo *)tmp->data;
if (strcmp (info->name, info_tmp->name) == 0 && info_versions_equal (info, info_tmp))
int len;
aname = mono_assembly_remap_version (aname, &maped_aname);
-
+
/* Reflection only assemblies don't get assembly binding */
if (!refonly)
aname = mono_assembly_apply_binding (aname, &maped_name_pp);
{1264, 1328, 1264, 1328, 1792, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1795, 1811, 1824, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
- {1264, 1328, 1264, 1328, 1359, 1337, 1828, 1343, 1831, 1843, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+ {1264, 1328, 1264, 1328, 1359, 1337, 1828, 1343, 1831, 1843, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {2, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1854, 1865, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
- {1264, 1328, 1264, 1328, 0, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+ {1264, 1328, 1264, 1328, 0, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1, 1264, 1, 1264, 1875, 1494, 0, 1296, 1347, 1311, 55, 1357, 3, 0, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
{1264, 11, 1264, 11, 1884, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1888, 1337, 1891, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
{11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
{11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
- {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 2, 2, 1, 2, 2, {3, 2}, {3, 2}},
+ {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 2, 2, 1, 2, 2, {3, -1}, {3, 2}},
{11, 1264, 11, 1264, 1971, 1337, 0, 1343, 1347, 1311, 55, 1357, 12, 2, 1, 1, 1, 2, 2, {3, 2}, {3, 2}},
{2067, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
{11, 1264, 11, 1264, 0, 1337, 1339, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
- {11, 1264, 11, 1264, 1380, 1337, 1339, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+ {11, 1264, 11, 1264, 1380, 1337, 1339, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, 0}, {3, -1}},
{11, 1264, 11, 1264, 2069, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
- {11, 1264, 11, 1264, 2072, 1337, 1339, 1343, 1347, 1311, 55, 1357, 5, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 0}},
- {1264, 11, 1264, 11, 2076, 1337, 2080, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 0, 2, {3, 0}, {3, 0}},
+ {11, 1264, 11, 1264, 2072, 1337, 1339, 1343, 1347, 1311, 55, 1357, 5, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}},
+ {1264, 11, 1264, 11, 2076, 1337, 2080, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2126, 1337, 2128, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
{1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1466, 1476, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1971, 1337, 0, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
- {11, 1264, 11, 1264, 2168, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 2}},
+ {11, 1264, 11, 1264, 2168, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 0, 1337, 1339, 1343, 1347, 1311, 55, 1357, 0, 0, 1, 0, 1, 2, 2, {3, -1}, {3, -1}},
- {11, 1264, 11, 1264, 2176, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 1, {3, 0}, {3, 0}},
+ {11, 1264, 11, 1264, 2176, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 1, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 0, 1337, 0, 1343, 1497, 1505, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2183, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 2}},
{1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 11, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2197, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1328, 11, 1328, 1924, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
- {1264, 11, 1264, 11, 1411, 1337, 1729, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 0}, {3, 0}},
+ {1264, 11, 1264, 11, 1411, 1337, 1729, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 0}, {3, -1}},
{11, 1264, 11, 1264, 2197, 1337, 1339, 1296, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1792, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2201, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1464, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2205, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
- {11, 1264, 11, 1264, 1380, 1337, 0, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 0}},
+ {11, 1264, 11, 1264, 1380, 1337, 0, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 1359, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1539, 1337, 1339, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 1792, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1795, 1811, 1824, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
- {1264, 1328, 1264, 1328, 1359, 1337, 1828, 1343, 1831, 1843, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+ {1264, 1328, 1264, 1328, 1359, 1337, 1828, 1343, 1831, 1843, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {2, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1854, 1865, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
- {1264, 1328, 1264, 1328, 1999, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+ {1264, 1328, 1264, 1328, 1999, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1, 1264, 1, 1264, 1875, 1494, 0, 1296, 1347, 1311, 55, 1357, 3, 0, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
{1264, 11, 1264, 11, 1884, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1888, 1337, 1891, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
{11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
{11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
- {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 2, 2, 1, 2, 2, {3, 2}, {3, 2}},
+ {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 2, 2, 1, 2, 2, {3, -1}, {3, 2}},
{11, 1264, 11, 1264, 1971, 1337, 0, 1343, 1347, 1311, 55, 1357, 12, 2, 1, 1, 1, 2, 2, {3, 2}, {3, 2}},
{2067, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
{11, 1264, 11, 1264, 2263, 1337, 1339, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
- {11, 1264, 11, 1264, 1380, 1337, 1339, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+ {11, 1264, 11, 1264, 1380, 1337, 1339, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, 0}, {3, -1}},
{11, 1264, 11, 1264, 2069, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
- {11, 1264, 11, 1264, 2072, 1337, 1339, 1343, 1347, 1311, 55, 1357, 5, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 0}},
- {1264, 11, 1264, 11, 2076, 1337, 2080, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 0, 2, {3, 0}, {3, 0}},
+ {11, 1264, 11, 1264, 2072, 1337, 1339, 1343, 1347, 1311, 55, 1357, 5, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}},
+ {1264, 11, 1264, 11, 2076, 1337, 2080, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2126, 1337, 2128, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
{1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1466, 1476, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1971, 1337, 0, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
- {11, 1264, 11, 1264, 2168, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 2}},
- {11, 1264, 11, 1264, 2176, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 1, {3, 0}, {3, 0}},
+ {11, 1264, 11, 1264, 2168, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+ {11, 1264, 11, 1264, 2176, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 1, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2267, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 2}},
{1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 11, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 11, 1264, 11, 2190, 1494, 1339, 1296, 1753, 1311, 1769, 1777, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2197, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1328, 11, 1328, 1924, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
- {1264, 11, 1264, 11, 1411, 1337, 1729, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 0}, {3, 0}},
+ {1264, 11, 1264, 11, 1411, 1337, 1729, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 0}, {3, -1}},
{11, 1264, 11, 1264, 2197, 1337, 1339, 1296, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1792, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1792, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1464, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2205, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
- {11, 1264, 11, 1264, 1380, 1337, 0, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 0}},
+ {11, 1264, 11, 1264, 1380, 1337, 0, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 1359, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1539, 1337, 1339, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 11, 1264, 11, 2292, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 2292, 1337, 1645, 1343, 1662, 1690, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 1359, 1337, 1729, 1736, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
- {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1753, 1311, 1769, 1777, 1, 0, 1, 2, 1, 2, 2, {3, -1}, {3, -1}},
+ {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1753, 1311, 1769, 1777, 1, 0, 1, 2, 1, 2, 2, {3, 2}, {3, -1}},
{1264, 1328, 1264, 1328, 2253, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1328, 11, 1328, 2294, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 2296, 1494, 2303, 1296, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2336, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 1, 0, 1, 2, 2, {3, 2}, {3, 2}},
{11, 1264, 11, 1264, 2340, 1494, 1339, 1296, 1347, 1311, 55, 1517, 9, 2, 9, 3, 2, 0, 2, {3, -1}, {3, -1}},
- {11, 1264, 11, 1264, 2343, 1337, 1339, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+ {11, 1264, 11, 1264, 2343, 1337, 1339, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 2, 2, {3, 2}, {3, 2}},
{11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2201, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2347, 1276, 1281, 1296, 1299, 1311, 1320, 1324, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2292, 1337, 1339, 1343, 1466, 1476, 55, 1357, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2562, 1337, 1339, 1343, 1466, 1476, 55, 1357, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1464, 1337, 1339, 1343, 1466, 1476, 55, 1357, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
- {11, 1264, 11, 1264, 1464, 1337, 1339, 1343, 1466, 1476, 55, 1357, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 0}},
+ {11, 1264, 11, 1264, 1464, 1337, 1339, 1343, 1466, 1476, 55, 1357, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 1464, 1337, 1339, 1343, 1466, 1476, 55, 1357, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 11, 1264, 11, 2423, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 11, 1264, 11, 2373, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2357, 1337, 2239, 1343, 1347, 1311, 55, 1357, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 1726, 1276, 1339, 1296, 1347, 1311, 55, 1324, 9, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 11, 1264, 11, 2573, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
- {1264, 1328, 1264, 1328, 1999, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+ {1264, 1328, 1264, 1328, 1999, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
{1264, 1328, 1264, 1328, 2257, 1494, 2041, 1296, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
{11, 1264, 11, 1264, 2340, 1494, 1339, 1296, 1347, 1311, 55, 1517, 9, 2, 9, 3, 2, 2, 2, {3, -1}, {3, -1}},
char wrapper [64];
char *klass_desc;
char *inst_desc = NULL;
+ MonoError error;
if (format == MONO_TYPE_NAME_FORMAT_IL)
klass_desc = mono_type_full_name (&method->klass->byval_arg);
strcpy (wrapper, "");
if (signature) {
- char *tmpsig = mono_signature_get_desc (mono_method_signature (method), TRUE);
+ MonoMethodSignature *sig = mono_method_signature_checked (method, &error);
+ char *tmpsig;
+
+ if (!is_ok (&error)) {
+ tmpsig = g_strdup_printf ("<unable to load signature>");
+ mono_error_cleanup (&error);
+ } else {
+ tmpsig = mono_signature_get_desc (sig, TRUE);
+ }
if (method->wrapper_type != MONO_WRAPPER_NONE)
sprintf (wrapper, "(wrapper %s) ", wrapper_type_to_str (method->wrapper_type));
else
strcpy (wrapper, "");
- if (ret) {
- char *ret_str = mono_type_full_name (mono_method_signature (method)->ret);
+ if (ret && sig) {
+ char *ret_str = mono_type_full_name (sig->ret);
res = g_strdup_printf ("%s%s %s:%s%s (%s)", wrapper, ret_str, klass_desc,
method->name, inst_desc ? inst_desc : "", tmpsig);
g_free (ret_str);
The ignored_assemblies list is generated using tools/nuget-hash-extractor and feeding the problematic nugets to it.
-Right now the list of nugets are the ones that provide the assemblies in $ignored_assemblies_names.
+Right now the list of nugets are the ones that provide the assemblies in $ignored_assemblies_file_names.
This is to be removed once a proper fix is shipped through nuget.
const char guid [40];
} IgnoredAssembly;
-const char *ignored_assemblies_names[] = {
+typedef struct {
+ int assembly_name;
+ guint16 major, minor, build, revision;
+} IgnoredAssemblyVersion;
+
+const char *ignored_assemblies_file_names[] = {
"System.Runtime.InteropServices.RuntimeInformation.dll",
"System.Globalization.Extensions.dll",
"System.IO.Compression.dll",
IGNORED_ASSEMBLY (0x75B4B041, SYS_VALUE_TUPLE, "F81A4140-A898-4E2B-B6E9-55CE78C273EC", "4.3.0 netstandard1.0"),
};
+
+const char *ignored_assemblies_names[] = {
+ "System.Runtime.InteropServices.RuntimeInformation",
+ "System.Globalization.Extensions",
+ "System.IO.Compression",
+ "System.Net.Http",
+ "System.Text.Encoding.CodePages",
+ "System.Reflection.DispatchProxy",
+ "System.ValueTuple"
+};
+
+#define IGNORED_ASM_VER(NAME, MAJOR, MINOR, BUILD, REVISION) { .assembly_name = NAME, .major = MAJOR, .minor = MINOR, .build = BUILD, .revision = REVISION }
+
+static const IgnoredAssemblyVersion ignored_assembly_versions [] = {
+ IGNORED_ASM_VER (SYS_GLOBALIZATION_EXT, 4, 0, 0, 0),
+ IGNORED_ASM_VER (SYS_GLOBALIZATION_EXT, 4, 0, 1, 0),
+ IGNORED_ASM_VER (SYS_GLOBALIZATION_EXT, 4, 0, 2, 0),
+ IGNORED_ASM_VER (SYS_IO_COMPRESSION, 4, 1, 0, 0),
+ IGNORED_ASM_VER (SYS_IO_COMPRESSION, 4, 1, 2, 0),
+ IGNORED_ASM_VER (SYS_NET_HTTP, 4, 1, 0, 0),
+ IGNORED_ASM_VER (SYS_NET_HTTP, 4, 1, 0, 1),
+ IGNORED_ASM_VER (SYS_NET_HTTP, 4, 1, 1, 0),
+ IGNORED_ASM_VER (SYS_REF_DISP_PROXY, 4, 0, 0, 0),
+ IGNORED_ASM_VER (SYS_REF_DISP_PROXY, 4, 0, 1, 0),
+ IGNORED_ASM_VER (SYS_REF_DISP_PROXY, 4, 0, 2, 0),
+ IGNORED_ASM_VER (SYS_RT_INTEROP_RUNTIME_INFO, 4, 0, 0, 0),
+ IGNORED_ASM_VER (SYS_RT_INTEROP_RUNTIME_INFO, 4, 0, 1, 0),
+ IGNORED_ASM_VER (SYS_TEXT_ENC_CODEPAGES, 4, 0, 1, 0),
+ IGNORED_ASM_VER (SYS_TEXT_ENC_CODEPAGES, 4, 0, 2, 0),
+ IGNORED_ASM_VER (SYS_VALUE_TUPLE, 4, 0, 1, 0),
+};
+
+gboolean
+mono_assembly_is_problematic_version (const char *name, guint16 major, guint16 minor, guint16 build, guint16 revision)
+{
+ return FALSE;
+ for (int i = 0; i < G_N_ELEMENTS (ignored_assembly_versions); ++i) {
+ if (ignored_assembly_versions [i].major != major ||
+ ignored_assembly_versions [i].minor != minor ||
+ ignored_assembly_versions [i].build != build ||
+ ignored_assembly_versions [i].revision != revision)
+ continue;
+ if (!strcmp (ignored_assemblies_names [ignored_assembly_versions [i].assembly_name], name))
+ return TRUE;
+ }
+ return FALSE;
+}
+
/*
Equivalent C# code:
static void Main () {
// Either sort by hash and bseach or use SoA and make the linear search more cache efficient.
for (int i = 0; i < G_N_ELEMENTS (ignored_assemblies); ++i) {
if (ignored_assemblies [i].hash == h && !strcmp (image->guid, ignored_assemblies [i].guid)) {
- const char *needle = ignored_assemblies_names [ignored_assemblies [i].assembly_name];
+ const char *needle = ignored_assemblies_file_names [ignored_assemblies [i].assembly_name];
size_t needle_len = strlen (needle);
size_t asm_len = strlen (image->name);
if (asm_len > needle_len && !g_ascii_strcasecmp (image->name + (asm_len - needle_len), needle))
void
mono_loader_register_module (const char *name, MonoDl *module);
+gboolean
+mono_assembly_is_problematic_version (const char *name, guint16 major, guint16 minor, guint16 build, guint16 revision);
+
#endif /* __MONO_METADATA_INTERNALS_H__ */
libmonoinclude_HEADERS = jit.h
-CSFLAGS = -unsafe -nowarn:0219,0169,0414,0649
+CSFLAGS = -unsafe -nowarn:0219,0169,0414,0649,0618
basic-simd.exe: basic-simd.cs TestDriver.dll
$(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:$(CLASS)/Mono.Simd.dll
return;
}
if (cfg->exception_type != MONO_EXCEPTION_NONE) {
- if (acfg->aot_opts.print_skipped_methods)
+ if (acfg->aot_opts.print_skipped_methods) {
printf ("Skip (JIT failure): %s\n", mono_method_get_full_name (method));
+ if (cfg->exception_message)
+ printf ("Caused by: %s\n", cfg->exception_message);
+ }
/* Let the exception happen at runtime */
return;
}
if (a.Y != 2)
return 2;
- a.X = 500000000000055l;
- a.Y = -12345678900l;
+ a.X = 500000000000055L;
+ a.Y = -12345678900L;
- if (a.X != 500000000000055l)
+ if (a.X != 500000000000055L)
return 3;
- if (a.Y != -12345678900l)
+ if (a.Y != -12345678900L)
return 4;
return 0;
}
// instead of RtlInstallFunctionTableCallback. This gives us the benefit to
// include all needed unwind upon registration.
typedef DWORD (NTAPI* RtlAddGrowableFunctionTablePtr)(
- _Out_ PVOID * DynamicTable,
- _In_reads_(MaximumEntryCount) PRUNTIME_FUNCTION FunctionTable,
- _In_ DWORD EntryCount,
- _In_ DWORD MaximumEntryCount,
- _In_ ULONG_PTR RangeBase,
- _In_ ULONG_PTR RangeEnd);
+ PVOID * DynamicTable,
+ PRUNTIME_FUNCTION FunctionTable,
+ DWORD EntryCount,
+ DWORD MaximumEntryCount,
+ ULONG_PTR RangeBase,
+ ULONG_PTR RangeEnd);
typedef VOID (NTAPI* RtlGrowFunctionTablePtr)(
- _Inout_ PVOID DynamicTable,
- _In_ DWORD NewEntryCount);
+ PVOID DynamicTable,
+ DWORD NewEntryCount);
typedef VOID (NTAPI* RtlDeleteGrowableFunctionTablePtr)(
- _In_ PVOID DynamicTable);
+ PVOID DynamicTable);
#endif /* HOST_WIN32 */
MINI_OP(OP_PMULW, "pmulw", XREG, XREG, XREG)
MINI_OP(OP_PMULD, "pmuld", XREG, XREG, XREG)
+/* Multiplies two 32 bit numbers into a 64 bit one */
MINI_OP(OP_PMULQ, "pmulq", XREG, XREG, XREG)
MINI_OP(OP_PMULW_HIGH_UN, "pmul_high_un", XREG, XREG, XREG)
if (cfg->method->save_lmf) {
cfg->create_lmf_var = TRUE;
cfg->lmf_ir = TRUE;
-#ifndef HOST_WIN32
+#if !defined(HOST_WIN32) && !defined(TARGET_ANDROID)
cfg->lmf_ir_mono_lmf = TRUE;
#endif
}
/* check if we need to restore protection of the stack after a stack overflow */
if (!cfg->compile_aot && mono_arch_have_fast_tls () && mono_tls_get_tls_offset (TLS_KEY_JIT_TLS) != -1) {
code = mono_x86_emit_tls_get (code, X86_ECX, mono_tls_get_tls_offset (TLS_KEY_JIT_TLS));
- } else {
- gpointer func = mono_tls_get_tls_getter (TLS_KEY_JIT_TLS, TRUE);
- /* FIXME use tls only from IR level */
- x86_xchg_reg_reg (code, X86_EAX, X86_ECX, 4);
- code = emit_call (cfg, code, MONO_PATCH_INFO_INTERNAL_METHOD, func);
- x86_xchg_reg_reg (code, X86_EAX, X86_ECX, 4);
- }
- /* we load the value in a separate instruction: this mechanism may be
- * used later as a safer way to do thread interruption
- */
- x86_mov_reg_membase (code, X86_ECX, X86_ECX, MONO_STRUCT_OFFSET (MonoJitTlsData, restore_stack_prot), 4);
- x86_alu_reg_imm (code, X86_CMP, X86_ECX, 0);
- patch = code;
- x86_branch8 (code, X86_CC_Z, 0, FALSE);
- /* note that the call trampoline will preserve eax/edx */
- x86_call_reg (code, X86_ECX);
- x86_patch (patch, code);
+ /* we load the value in a separate instruction: this mechanism may be
+ * used later as a safer way to do thread interruption
+ */
+ x86_mov_reg_membase (code, X86_ECX, X86_ECX, MONO_STRUCT_OFFSET (MonoJitTlsData, restore_stack_prot), 4);
+ x86_alu_reg_imm (code, X86_CMP, X86_ECX, 0);
+ patch = code;
+ x86_branch8 (code, X86_CC_Z, 0, FALSE);
+ /* note that the call trampoline will preserve eax/edx */
+ x86_call_reg (code, X86_ECX);
+ x86_patch (patch, code);
+ }
/* restore caller saved regs */
if (cfg->used_int_regs & (1 << X86_EBX)) {
case MONO_TYPE_U4:
case MONO_TYPE_I4:
return OP_PMULD;
- case MONO_TYPE_U8:
- case MONO_TYPE_I8:
- return OP_PMULQ;
case MONO_TYPE_R4:
return OP_MULPS;
case MONO_TYPE_R8:
return OP_MULPD;
+ case MONO_TYPE_U8:
+ /* PMULQ multiplies two 32 bit numbers into a 64 bit one */
+ return -1;
+ case MONO_TYPE_I8:
+ return -1;
default:
break;
}
case SN_op_Explicit:
return simd_intrinsic_emit_cast (intrins, cfg, cmethod, args);
case SN_Equals:
- if (fsig->param_count == 1)
+ if (fsig->param_count == 1 && fsig->ret->type == MONO_TYPE_BOOLEAN && mono_metadata_type_equal (fsig->params [0], type))
return simd_intrinsic_emit_equality_op (cfg, cmethod, args, type_to_comp_op (etype), SIMD_COMP_EQ);
- if (fsig->param_count == 2)
+ if (fsig->param_count == 2 && fsig->ret->type == MONO_TYPE_BOOLEAN && mono_metadata_type_equal (fsig->params [0], type) && mono_metadata_type_equal (fsig->params [1], type))
return simd_intrinsic_emit_binary_op (cfg, type_to_comp_op (etype), 0, cmethod->klass, fsig->params [0], fsig->params [1], args [0], args [1]);
break;
switch (intrins->name) {
case SN_GreaterThan:
return simd_intrinsic_emit_binary_op (cfg, gt_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [0], args [1]);
- case SN_LessThanOrEqual:
+ case SN_LessThan:
return simd_intrinsic_emit_binary_op (cfg, gt_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [1], args [0]);
+ case SN_LessThanOrEqual:
+ cmp1 = simd_intrinsic_emit_binary_op (cfg, eq_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [1], args [0]);
+ cmp2 = simd_intrinsic_emit_binary_op (cfg, gt_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [1], args [0]);
+ return simd_intrinsic_emit_binary_op (cfg, OP_POR, 0, cmethod->klass, fsig->params [0], fsig->params [1], cmp1, cmp2);
case SN_GreaterThanOrEqual:
cmp1 = simd_intrinsic_emit_binary_op (cfg, eq_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [0], args [1]);
cmp2 = simd_intrinsic_emit_binary_op (cfg, gt_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [0], args [1]);
return simd_intrinsic_emit_binary_op (cfg, OP_POR, 0, cmethod->klass, fsig->params [0], fsig->params [1], cmp1, cmp2);
- case SN_LessThan:
- cmp1 = simd_intrinsic_emit_binary_op (cfg, eq_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [1], args [0]);
- cmp2 = simd_intrinsic_emit_binary_op (cfg, gt_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [1], args [0]);
- return simd_intrinsic_emit_binary_op (cfg, OP_POR, 0, cmethod->klass, fsig->params [0], fsig->params [1], cmp1, cmp2);
default:
g_assert_not_reached ();
break;
mctx->esi = UCONTEXT_REG_ESI (ctx);
mctx->edi = UCONTEXT_REG_EDI (ctx);
mctx->eip = UCONTEXT_REG_EIP (ctx);
+#ifdef UCONTEXT_REG_XMM
+ mctx->fregs [0] = UCONTEXT_REG_XMM0 (ctx);
+ mctx->fregs [1] = UCONTEXT_REG_XMM1 (ctx);
+ mctx->fregs [2] = UCONTEXT_REG_XMM2 (ctx);
+ mctx->fregs [3] = UCONTEXT_REG_XMM3 (ctx);
+ mctx->fregs [4] = UCONTEXT_REG_XMM4 (ctx);
+ mctx->fregs [5] = UCONTEXT_REG_XMM5 (ctx);
+ mctx->fregs [6] = UCONTEXT_REG_XMM6 (ctx);
+ mctx->fregs [7] = UCONTEXT_REG_XMM7 (ctx);
+#endif
#elif defined(HOST_WIN32)
CONTEXT *context = (CONTEXT*)sigctx;
UCONTEXT_REG_ESI (ctx) = mctx->esi;
UCONTEXT_REG_EDI (ctx) = mctx->edi;
UCONTEXT_REG_EIP (ctx) = mctx->eip;
+#ifdef UCONTEXT_REG_XMM
+ UCONTEXT_REG_XMM0 (ctx) = mctx->fregs [0];
+ UCONTEXT_REG_XMM1 (ctx) = mctx->fregs [1];
+ UCONTEXT_REG_XMM2 (ctx) = mctx->fregs [2];
+ UCONTEXT_REG_XMM3 (ctx) = mctx->fregs [3];
+ UCONTEXT_REG_XMM4 (ctx) = mctx->fregs [4];
+ UCONTEXT_REG_XMM5 (ctx) = mctx->fregs [5];
+ UCONTEXT_REG_XMM6 (ctx) = mctx->fregs [6];
+ UCONTEXT_REG_XMM7 (ctx) = mctx->fregs [7];
+#endif
#elif defined(HOST_WIN32)
CONTEXT *context = (CONTEXT*)sigctx;
[xmm4] MONO_CONTEXT_OFFSET (fregs, X86_XMM4, MonoContextSimdReg), \
[xmm5] MONO_CONTEXT_OFFSET (fregs, X86_XMM5, MonoContextSimdReg), \
[xmm6] MONO_CONTEXT_OFFSET (fregs, X86_XMM6, MonoContextSimdReg), \
- [xmm7] MONO_CONTEXT_OFFSET (fregs, X86_XMM7, MonoContextSimdReg), \
+ [xmm7] MONO_CONTEXT_OFFSET (fregs, X86_XMM7, MonoContextSimdReg)); \
} while (0)
#else
#define MONO_CONTEXT_GET_CURRENT_FREGS(ctx)
#define UCONTEXT_REG_ESI(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__esi)
#define UCONTEXT_REG_EDI(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__edi)
#define UCONTEXT_REG_EIP(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__eip)
+ #define UCONTEXT_REG_XMM
+ #define UCONTEXT_REG_XMM0(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm0)
+ #define UCONTEXT_REG_XMM1(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm1)
+ #define UCONTEXT_REG_XMM2(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm2)
+ #define UCONTEXT_REG_XMM3(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm3)
+ #define UCONTEXT_REG_XMM4(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm4)
+ #define UCONTEXT_REG_XMM5(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm5)
+ #define UCONTEXT_REG_XMM6(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm6)
+ #define UCONTEXT_REG_XMM7(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm7)
# else
#define UCONTEXT_REG_EAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext->ss.eax)
#define UCONTEXT_REG_EBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext->ss.ebx)
ECHO copy %WIN_CONFIG_H% %CONFIG_H%
copy %WIN_CONFIG_H% %CONFIG_H%
%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -Command "(Get-Content %CONFIG_H%) -replace '#MONO_VERSION#', (Select-String -path %CONFIGURE_AC% -pattern 'AC_INIT\(mono, \[(.*)\]').Matches[0].Groups[1].Value | Set-Content %CONFIG_H%" 2>&1
+ %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -Command "$mono_version=[int[]](Select-String -path %CONFIGURE_AC% -pattern 'AC_INIT\(mono, \[(.*)\]').Matches[0].Groups[1].Value.Split('.'); $corlib_counter=[int](Select-String -path %CONFIGURE_AC% -pattern 'MONO_CORLIB_COUNTER=(.*)').Matches[0].Groups[1].Value; (Get-Content %CONFIG_H%) -replace '#MONO_CORLIB_VERSION#',('1{0:00}{1:00}{2:00}{3:000}' -f $mono_version[0],$mono_version[1],$mono_version[2],$corlib_counter) | Set-Content %CONFIG_H%" 2>&1
)
%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -NonInteractive -File compare-config-files.ps1 %EGLIB_WIN_CONFIG_H% %EGLIB_CONFIG_H% 2>&1
};
static readonly Dictionary<int, string[][]> GroupSizes = new Dictionary<int, string[][]> {
- { 0x0028, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+ { 0x0026, new [] { new [] { "2" }, new [] { "3" }, new [] { "3" } } },
{ 0x0039, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x0045, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x0046, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x0049, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x004a, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x004b, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
- { 0x004c, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
+ { 0x004c, new [] { new [] { "3" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x004d, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x004e, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x004f, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
- { 0x0051, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x0053, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x0054, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+ { 0x0051, new [] { new [] { "3", "0" }, new [] { "3" }, new [] { "3" } } },
{ 0x0057, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
- { 0x005b, new [] { new [] { "3" }, new [] { "3", "2" }, new [] { "3", "2" } } },
- { 0x005d, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x005e, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+ { 0x0060, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x0061, new [] { new [] { "3" }, new [] { "3", "2" }, new [] { "3", "2" } } },
- { 0x006d, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x006f, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x0078, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x007c, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x0428, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+ { 0x006f, new [] { new [] { "3", "0" }, new [] { "3" }, new [] { "3" } } },
+ { 0x0426, new [] { new [] { "2" }, new [] { "3" }, new [] { "3" } } },
{ 0x0439, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x0445, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x0446, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x0449, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x044a, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x044b, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
- { 0x044c, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
+ { 0x044c, new [] { new [] { "3" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x044d, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x044e, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x044f, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
- { 0x0451, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x0453, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x0454, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+ { 0x0451, new [] { new [] { "3", "0" }, new [] { "3" }, new [] { "3" } } },
{ 0x0457, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
- { 0x045b, new [] { new [] { "3" }, new [] { "3", "2" }, new [] { "3", "2" } } },
- { 0x045d, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x045e, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+ { 0x0460, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x0461, new [] { new [] { "3" }, new [] { "3", "2" }, new [] { "3", "2" } } },
- { 0x046d, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x046f, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x0478, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x047c, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+ { 0x046f, new [] { new [] { "3", "0" }, new [] { "3" }, new [] { "3" } } },
+ { 0x0820, new [] { new [] { "3", "2" }, new [] { "3" }, new [] { "3" } } },
{ 0x0845, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
+ { 0x0849, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x0850, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x085d, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+ { 0x0860, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
+ { 0x0c50, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+ { 0x0c51, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
{ 0x4009, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
- { 0x540a, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x785d, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x7c28, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
{ 0x7c50, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
- { 0x7c5d, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
};
static readonly Dictionary<int, string[]> Text = new Dictionary<int, string[]> {
nuget-hash-extractor.exe: $(SOURCES)
mcs /r:System.Xml.Linq /r:System.IO.Compression -o:nuget-hash-extractor.exe $(SOURCES)
-download:
+.download_stamp_file: Makefile download.sh
echo "Downloading all the nugets"; \
./download.sh
-run: nuget-hash-extractor.exe
+download: .download_stamp_file
+
+run: nuget-hash-extractor.exe .download_stamp_file
mono nuget-hash-extractor.exe nugets
+
+run-asm: nuget-hash-extractor.exe .download_stamp_file
+ mono nuget-hash-extractor.exe nugets asm
+
+run-ver: nuget-hash-extractor.exe .download_stamp_file
+ mono nuget-hash-extractor.exe nugets ver
+
.PHONY: download run
#System.ValueTuple
wget https://www.nuget.org/api/v2/package/System.ValueTuple/4.3.0 -O nugets/system.valuetuple.4.3.0.nupkg
-#System.Security.Cryptography.OpenSsl when .net 4.6.2 + 1 is out
\ No newline at end of file
+#System.Security.Cryptography.OpenSsl when .net 4.6.2 + 1 is out
+
+touch .download_stamp_file
\ No newline at end of file
LoadAndDump (et, version);
}
}
+
+ static bool dump_asm, dump_ver;
static void Main (string[] args) {
+
+ if (args.Length > 1) {
+ dump_asm = args [1].Equals ("asm");
+ dump_ver = args [1].Equals ("ver");
+ } else {
+ dump_asm = true;
+ }
foreach (var f in Directory.GetFiles (args [0], "*.nupkg")) {
DumpNuget (f);
}
var data = StreamToArray (entry.Open ());
AppDomain ad = AppDomain.CreateDomain ("parse_" + ++domain_id);
DoParse p = (DoParse)ad.CreateInstanceAndUnwrap (typeof (DoParse).Assembly.FullName, typeof (DoParse).FullName);
- p.ParseAssembly (data, version, entry.Name, entry.FullName);
+ p.ParseAssembly (data, version, entry.Name, entry.FullName, dump_asm, dump_ver);
AppDomain.Unload (ad);
}
}
class DoParse : MarshalByRefObject {
+
static int Hash (string str) {
int h = 5381;
for (int i = 0; i < str.Length; ++i)
return parts[parts.Length - 2];
}
- public void ParseAssembly (byte[] data, string version, string name, string fullname) {
+ public void ParseAssembly (byte[] data, string version, string name, string fullname, bool dump_asm, bool dump_ver) {
var a = Assembly.ReflectionOnlyLoad (data);
var m = a.GetModules ()[0];
var id = m.ModuleVersionId.ToString ().ToUpper ();
string ver_str = version + " " + FileToMoniker (fullname);
- Console.WriteLine ($"IGNORED_ASSEMBLY (0x{hash_code}, {str}, \"{id}\", \"{ver_str}\"),");
+ if (dump_asm)
+ Console.WriteLine ($"IGNORED_ASSEMBLY (0x{hash_code}, {str}, \"{id}\", \"{ver_str}\"),");
+
+ //IGNORED_ASM_VER (SYS_IO_COMPRESSION, 4, 1, 2, 0),
+ var ver = a.GetName ().Version;
+ if (dump_ver)
+ Console.WriteLine ($"IGNORED_ASM_VER ({str}, {ver.Major}, {ver.Minor}, {ver.Build}, {ver.Revision}),");
+
}
}
\ No newline at end of file
/* Version number of package */
#define VERSION "#MONO_VERSION#"
+
+/* Version of the corlib-runtime interface */
+#define MONO_CORLIB_VERSION #MONO_CORLIB_VERSION#
+
#endif