c# - Extending System.Net.WebClient cause editor error in Visual Studio 2013 Unity Tool -
in unity project, extended system.net.webclient class add timeout property this question.
class webdownload : webclient { public int timeout { get; set; } public webdownload() : this(60000) { } public webdownload(int timeout) { this.timeout = timeout; } protected override webrequest getwebrequest(uri address) { var request = base.getwebrequest(address); if (request != null) { request.timeout = this.timeout; } return request; } } after save file, visual studio 2013 gives error :

even if visual studio gives error, program compiled without error , can use webdownload object without problem. tried same thing empty project , time did not give error.
is bug in visual studio 2013 unity tool?
here error stack (in case image not readable) :
at system.componentmodel.typedescriptor.addattributes(object instance, attribute[] attributes) @ microsoft.visualstudio.design.vsdesignsurface.createdesigner(icomponent component, boolean rootdesigner) @ system.componentmodel.design.designerhost.addtocontainerpostprocess(icomponent component, string name, icontainer containertoaddto) @ system.componentmodel.design.designerhost.performadd(icomponent component, string name) @ system.componentmodel.design.designerhost.system.componentmodel.design.idesignerhost.createcomponent(type componenttype, string name) @ system.componentmodel.design.serialization.designerserializationmanager.createinstance(type type, icollection arguments, string name, boolean addtocontainer) @ system.componentmodel.design.serialization.designerserializationmanager.system.componentmodel.design.serialization.idesignerserializationmanager.createinstance(type type, icollection arguments, string name, boolean addtocontainer) @ system.componentmodel.design.serialization.typecodedomserializer.deserialize(idesignerserializationmanager manager, codetypedeclaration declaration) @ system.componentmodel.design.serialization.codedomdesignerloader.performload(idesignerserializationmanager manager) @ microsoft.visualstudio.design.serialization.codedom.vscodedomdesignerloader.performload(idesignerserializationmanager serializationmanager) @ system.componentmodel.design.serialization.basicdesignerloader.beginload(idesignerloaderhost host)
Comments
Post a Comment