get { return (string) properties["Company"]; }
set { SetValue ("Company", value); }
}
-\r
+
public virtual string ComponentType {
get { return ".NET Component"; }
}
-\r
+
public AssemblyName[] DependentAssemblies {
get { return (AssemblyName[]) properties["DependentAssemblies"]; }
set {
SetValue ("DependentAssemblies", names);
}
}
-\r
+
public string Description {
get { return (string) properties["Description"]; }
set { SetValue ("Description", value); }
- }\r
-\r
+ }
+
public bool IsTransient {
get {
object o = properties ["IsTransient"];
}
set { SetValue ("IsTransient", value); }
}
-\r
+
public IDictionary Properties {
get { return properties; }
}
// FIXME - get error handling logic correct
protected virtual IComponent[] CreateComponentsCore (IDesignerHost host)
- {\r
- if (host == null)\r
+ {
+ if (host == null)
throw new ArgumentNullException("host");
OnComponentsCreating(new ToolboxComponentsCreatingEventArgs(host));
- \r
- IComponent[] components;\r
+
+ IComponent[] components;
Type type = GetType(host, AssemblyName, TypeName, true);
- if (type == null)\r
+ if (type == null)
components = new IComponent[] { };
- else\r
+ else
components = new IComponent[] { host.CreateComponent(type) };
- OnComponentsCreated(new ToolboxComponentsCreatedEventArgs(components));\r
+ OnComponentsCreated(new ToolboxComponentsCreatedEventArgs(components));
return components;
}
}
[MonoTODO]
- public IComponent[] CreateComponents (IDesignerHost host, IDictionary defaultValues)\r
+ public IComponent[] CreateComponents (IDesignerHost host, IDictionary defaultValues)
{
throw new NotImplementedException ();
}
[MonoTODO]
- public Type GetType (IDesignerHost host)\r
+ public Type GetType (IDesignerHost host)
{
if (host == null)
- return null;\r
- throw new NotImplementedException ();\r
+ return null;
+ throw new NotImplementedException ();
}
- protected virtual object FilterPropertyValue (string propertyName, object value)\r
+ protected virtual object FilterPropertyValue (string propertyName, object value)
{
switch (propertyName) {
case "AssemblyName":
default:
return value;
}
- }\r
+ }
#endif
protected virtual void Deserialize (SerializationInfo info, StreamingContext context)
}
protected virtual Type GetType (IDesignerHost host, AssemblyName assemblyName, string typeName, bool reference)
- {\r
- if (typeName == null)\r
+ {
+ if (typeName == null)
throw new ArgumentNullException ("typeName");
if (host == null)
throw new Exception("Host does not provide an ITypeResolutionService");
//TODO: Using Assembly loader to throw errors. Silent fail and return null?
- typeRes.GetAssembly(assemblyName, true);\r
- if (reference)\r
- typeRes.ReferenceAssembly(assemblyName);\r
+ typeRes.GetAssembly(assemblyName, true);
+ if (reference)
+ typeRes.ReferenceAssembly(assemblyName);
return typeRes.GetType(typeName, true);
}
}
#if NET_2_0
- protected void ValidatePropertyType (string propertyName, object value, Type expectedType, bool allowNull)\r
+ protected void ValidatePropertyType (string propertyName, object value, Type expectedType, bool allowNull)
{
if (!allowNull && (value == null))
throw new ArgumentNullException ("value");
}
}
- protected virtual object ValidatePropertyValue (string propertyName, object value)\r
+ protected virtual object ValidatePropertyValue (string propertyName, object value)
{
switch (propertyName) {
case "AssemblyName":