打印本文 打印本文 关闭窗口 关闭窗口
ASP.NET 从Beta1 升级到 Beta2 的新变化
作者:武汉SEO闵涛  文章来源:敏韬网  点击数4579  更新时间:2009/4/23 10:48:41  文章录入:mintao  责任编辑:mintao
ed virtual void WriteAsyncRequest(Stream requestStream, object internalAsyncState);

protected WebResponse EndSend(IAsyncResult asyncResult, ref object internalAsyncState);

protected static object GetFromCache(Type type);

protected static void AddToCache(Type type, object value);

}

public abstract class HttpWebClientProtocol : WebClientProtocol {

          // Constructors

      protected HttpWebClientProtocol();

      // Properties

      public bool AllowAutoRedirect { get; set; }

      public CookieContainer CookieContainer { get; set; }

      public bool EnableCookies { get; set; }

      public string UserAgent { get; set; }

      public IWebProxy Proxy { get; set; }

      public ServicePoint { get; }

      // Methods

}

public class SoapHttpClientProtocol : HttpWebClientProtocol {

// Constructors

public SoapHttpClientProtocol();

// Properties

// Methods

public void Discover();

protected object[] Invoke(string methodName, object[] parameters);

protected IAsyncResult BeginInvoke(string methodName, object[] parameters, AsyncCallback callback, object asyncState);

protected object[] EndInvoke(IAsyncResult asyncResult);

}

public abstract class HttpSimpleClientProtocol : HttpWebClientProtocol {

// Constructors

protected HttpSimpleClientProtocol();

// Properties

// Methods

protected object Invoke(string methodName, string requestUrl, object[] parameters);

protected IAsyncResult BeginInvoke(string methodName, string requestUrl, object[] parameters, AsyncCallback callback, object asyncState);

protected object EndInvoke(IAsyncResult asyncResult);

}

public class HttpPostClientProtocol : HttpSimpleClientProtocol {

// Constructors

public HttpPostClientProtocol();

// Properties

// Methods

}

public class HttpGetClientProtocol : HttpSimpleClientProtocol {

// Constructors

public HttpGetClientProtocol();

// Properties

// Methods

}

         WebServiceUtil has been split into two tools: disco.exe and wsdl.exe. This is to simplify the command line arguments for using these features.

         The SoapExtension class now has a method for chaining the stream that can be overridden by SoapExtension writers. This allows chaining of the stream from the highest priority extension to the least, but calling the message orders from the least priority to highest.

         The method bool MessageEnumerator.MoveNext(TimeSpan timeout) is now void.

Old Code:

if(enumerator.MoveNext(timeout)){

ProcessNextMessage();

}

else{ StopProcessing(); }

New Code:

try{ enumerator.MoveNext(timeout));

ProcessNextMessage();

catch(TimeoutException){

StopProcessing();

}

         HttpCachePolicy.SetEtagFromFileDependencies() has been renamed to SetETagFromFileDependencies().

         The System.Web.UI.Web controls.Column.SortField property has been renamed to SortExpression. This is because it typically contains order information besides the field name, and might potentially contain multiple fields as well.

         Changes to Web controls (DataGrid, Table) and related classes.

         Renamed Column to DataGridColumn.

         Renamed ColumnCollection to DataGridColumnCollection.

         Removed TableRowCollection.AddWithCells().

         Removed TableCellCollection.AddWithContents().

         Changes to control and property attributes.

         Renamed TemplateAttribute to TemplateContainerAttribute.

         Replaced LiteralContentAttribute with PersistChildrenAttribute.

         Renamed PersistenceTypeAttribute to PersistenceModeAttribute.

         Replaced PersistenceMode.Tag with PersistenceMode.Attribute.

         Replaced PersistenceMode.Inner with PersistenceMode.InnerProperty.

         Replaced PersistenceMode.InnerChild with PersistenceMode.InnerDefaultProperty.

         Renamed ParseChildrenAsPropertiesAttribute to ParseChildrenAttribute.

         Changed Design-time control and template parsing. Any control and template parsing should be done by calling ControlParser.ParseControl() and ControlParser.ParseTemplate(), instead of calling ParseDesignerModeControl() and ParseDesignerModeTemplate() directly.

         The second parameter to the older DesignTimeData.DataBindingHandler() methods has been removed.

Old Code:

ParseDesignerModeControl(string, eventhandler)
ParseDesignerModeTemplate(string, eventhandler)

New Code:

ControlParser.ParseControl(IDesignerHost, string)
ControlParser.ParseTemplates(IDesignerHost, string)

         Changes to the control designer class hierarchy.

         Merged UserControlDesigner and WebControlDesigner into a single class called ControlDesigner.

         HtmlControlDesigner now derives directly from ComponentDesigner.

         Removed the old ControlDesigner class.

         Renamed PageletDesigner to UserControlDesigner.

         Renamed IUserControlDesignerBehavior to IControlDesignerBehavior.


New Hierarchy:
ComponentDesigner
    HtmlControlDesigner
        ControlDesigner
            TemplatedControlDesigner
            ReadWriteControlDesigner
            UserControlDesigner

         The WebFormDesigner in Visual Studio.NET should now derive from ComponentDesigner directly.

         All designers that derived from WebControlDesigner should derive from ControlDesigner.

         All designers that support template editing should derive from TemplatedControlDesigner, because support has been added for both Control-based and WebControl-based controls that have template properties.

         Changes to ASP.NET Control Designers DesignTimeHTML and Control.

         Renamed GetDesignTimeHTML to GetDesignTimeHtml.

         Similar renames for other Design-time HTML methods and GetPersistInnerHTML.

         Corresponding changes in IControlDesignerBehavior.

         OnControlResize and RaiseResizeEvent do not take any parameters. This method should only be called when the resize takes place due to a user action.

         Changes to System.Web.UI.Design.WebControlPersister.

         Renamed to ControlPersister.

         Methods Removed:

PersistChildControls()

PersistCollectionProperty()

PersistComplexProperty()

PersistStringProperty()

PersistTemplateProperty()

PersistDataBindings()

PersistTagProperties()

         All methods that took a StringWriter now take a TextWriter instead.

         All methods that took in an IWeb formservices now take in an IDesignerHost reference instead.

         Changes to Control and related clas

上一页  [1] [2] [3] [4] [5] [6] [7]  下一页

打印本文 打印本文 关闭窗口 关闭窗口