.net Framework从Beta2到正式版有何变化?

lvli007 2002-07-12 04:12:19
比如:名字空间、语法(尽管不太可能),那位知道的话列举一下。谢了!
...全文
45 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
WarFather 2002-07-21
  • 打赏
  • 举报
回复
就不能翻译过来啊?
freesoul_ms 2002-07-15
  • 打赏
  • 举报
回复
Change List: Beta 2 to Build RTM(2)

Security

• Changed System.Security.Cryptography.

ICryptoTransform now has the IDisposable interface. The new property, SymmetricAlgorithm, and AssymetricAlgorithm also implement IDisposable now, which allows for deterministic finilalization of crypto transforms.

In keeping with design guidelines, the dispose member was named Clear, which fits better for crypto.

• Verifiable code must now set the initlocal's bit on the method.

Every MSIL method has a bit that indicates whether local variables will
automatically be initialized to 0 by the JIT compiler. This bit must
now be set for code that has local variables, if it is to be verifiable.

This change generally only affects MSIL compilers that want to emit
verifiable code. C# and Visual Basic already conform to this change. ReflectionEmit
has been changed, so it also sets this bit by default. Thus scripting
is also covered. Third party compilers that generate PE files directly
or use ILASM need to be updated, if verifiability is a concern.

There should be very little performance change because of this. The
JIT compiler already eliminates most dead stores, and thus will not double
initialize variables.

For ILASM replace

.locals

with

.locals init.


• Removed DemandImmediate.

DemandImmediate has been removed everywhere that it is defined. This includes the following:

CodeAccessPermission.DemandImmediate
IPermission.DemandImmediate
IStackWalk.DemandImmediate
PermissionSet.DemandImmediate
PrincipalPermission.DemandImmediate.

Any class that extends CodeAccessPermisison has also been removed.
This is being done to eliminate a security vulnerability in which DemandImmediate could be circumvented by passing a delegate containing one to more trusted code so that the immediate caller would have a higher permission grant. This does not affect regular Demands or declarative LinkDemands.

LinkDemand can be used to perform caller-only security checks. The absence of DemandImmediate, though, prevents runtime caller-only checks using dynamic information (for example, a file name not known until runtime). In general, caller-only checks should be avoided in favor of those that perform a complete stack walk, because the former does not protect against luring attacks, while the latter does. Caller-only identity permission demands, where demand immediate seemed most useful, can still be done by having the caller assert their identity permission if they are safe from misuse by their callers.

• Removed WebPageMembershipCondition and SkipVerificationMembershipCondition.

The classes WebPageMembershipCondition and SkipVerificationMembershipCondition have been removed from the product and are no longer available for use in policy from the tools Caspol.exe and Mscorcfg.msc.

• Enabled HMAC-SHA1 XML Digital Signatures.

API changes in System.Security.dll (System.Security.Cryptography.Xml namespace) to enable HMAC-SHA1 based XMLDSIG digital signatures.

• Enabled HMAC-SHA1 XML Digital Signatures.

API changes in System.Security.dll (System.Security.Cryptography.Xml namespace) to enable HMAC-SHA1 based XMLDSIG digital signatures.

• Array creation opcodes now take signed (previously unsigned) numbers and can throw OverflowException.


ASP.NET Changes

• Changed KeyedHashAlgorithm.

The secret key in KeyedHashAlgorithms is zeroed on Dispose. Instances of CryptoStream, SHA1, and TripleDES used internally in the KeyedHashAlgorithm classes HMACSHA1 and MACTripleDES are also cleaned up.

• Changed System.ComponentModel.Component.Dispose to non-virtual.

Inheriting types should override protected void Dispose(bool) .

• Changed SetItemsCore(object[] items) and SetItemsCore(IList items) to reduce the overhead of populating a databound list in ListControl.

ListControl contains the following abstract method:

protected abstract void SetItemsCore(object[] items);

This method is used to populate the Listbox or ComboBox from a DataSource. Because DataSource is an IList and SetItemsCore takes an array, the contents of the datasource have to be unnecessarily copied into an array.




======================
- 微软全球技术中心-
本贴子仅供CSDN的用户作为参考信息使用。其内容不具备任何法律保障。您需要考虑到并承担使用此信息可能带来的风险。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
为了为您创建更好的讨论环境,请参加我们的用户满意度调查(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。
======================
freesoul_ms 2002-07-15
  • 打赏
  • 举报
回复
Change List: Beta 2 to Build RTM(2)

Security

• Changed System.Security.Cryptography.

ICryptoTransform now has the IDisposable interface. The new property, SymmetricAlgorithm, and AssymetricAlgorithm also implement IDisposable now, which allows for deterministic finilalization of crypto transforms.

In keeping with design guidelines, the dispose member was named Clear, which fits better for crypto.

• Verifiable code must now set the initlocal's bit on the method.

Every MSIL method has a bit that indicates whether local variables will
automatically be initialized to 0 by the JIT compiler. This bit must
now be set for code that has local variables, if it is to be verifiable.

This change generally only affects MSIL compilers that want to emit
verifiable code. C# and Visual Basic already conform to this change. ReflectionEmit
has been changed, so it also sets this bit by default. Thus scripting
is also covered. Third party compilers that generate PE files directly
or use ILASM need to be updated, if verifiability is a concern.

There should be very little performance change because of this. The
JIT compiler already eliminates most dead stores, and thus will not double
initialize variables.

For ILASM replace

.locals

with

.locals init.


• Removed DemandImmediate.

DemandImmediate has been removed everywhere that it is defined. This includes the following:

CodeAccessPermission.DemandImmediate
IPermission.DemandImmediate
IStackWalk.DemandImmediate
PermissionSet.DemandImmediate
PrincipalPermission.DemandImmediate.

Any class that extends CodeAccessPermisison has also been removed.
This is being done to eliminate a security vulnerability in which DemandImmediate could be circumvented by passing a delegate containing one to more trusted code so that the immediate caller would have a higher permission grant. This does not affect regular Demands or declarative LinkDemands.

LinkDemand can be used to perform caller-only security checks. The absence of DemandImmediate, though, prevents runtime caller-only checks using dynamic information (for example, a file name not known until runtime). In general, caller-only checks should be avoided in favor of those that perform a complete stack walk, because the former does not protect against luring attacks, while the latter does. Caller-only identity permission demands, where demand immediate seemed most useful, can still be done by having the caller assert their identity permission if they are safe from misuse by their callers.

• Removed WebPageMembershipCondition and SkipVerificationMembershipCondition.

The classes WebPageMembershipCondition and SkipVerificationMembershipCondition have been removed from the product and are no longer available for use in policy from the tools Caspol.exe and Mscorcfg.msc.

• Enabled HMAC-SHA1 XML Digital Signatures.

API changes in System.Security.dll (System.Security.Cryptography.Xml namespace) to enable HMAC-SHA1 based XMLDSIG digital signatures.

• Enabled HMAC-SHA1 XML Digital Signatures.

API changes in System.Security.dll (System.Security.Cryptography.Xml namespace) to enable HMAC-SHA1 based XMLDSIG digital signatures.

• Array creation opcodes now take signed (previously unsigned) numbers and can throw OverflowException.


ASP.NET Changes

• Changed KeyedHashAlgorithm.

The secret key in KeyedHashAlgorithms is zeroed on Dispose. Instances of CryptoStream, SHA1, and TripleDES used internally in the KeyedHashAlgorithm classes HMACSHA1 and MACTripleDES are also cleaned up.

• Changed System.ComponentModel.Component.Dispose to non-virtual.

Inheriting types should override protected void Dispose(bool) .

• Changed SetItemsCore(object[] items) and SetItemsCore(IList items) to reduce the overhead of populating a databound list in ListControl.

ListControl contains the following abstract method:

protected abstract void SetItemsCore(object[] items);

This method is used to populate the Listbox or ComboBox from a DataSource. Because DataSource is an IList and SetItemsCore takes an array, the contents of the datasource have to be unnecessarily copied into an array.




======================
- 微软全球技术中心-
本贴子仅供CSDN的用户作为参考信息使用。其内容不具备任何法律保障。您需要考虑到并承担使用此信息可能带来的风险。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
为了为您创建更好的讨论环境,请参加我们的用户满意度调查(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。
======================
freesoul_ms 2002-07-15
  • 打赏
  • 举报
回复
感谢您使用微软产品。

下面是.NET从beta2到RTM的差别列表,此外,您还可以从http://go.microsoft.com/fwlink/?LinkId=4372下载详细的“API Changes from Beta2 to RTM”的列表。
希望能对您有所帮助!

Change List: Beta 2 to Build RTM(1)

The following document contains a list of the changes to the .NET Framework class libraries, compilers (and languages), and SDK tools between the stated builds.

If you have any questions regarding this change list, send e-mail to netfwsdk@microsoft.com.



ClassLib Changes

• Switched to new W3c Xsd Schema 2001 types for Remoting SOAP and WSDL Engines.

To be compatible with other SOAP and WSDL engines that are moving to the new XSD Schema (ASMX, ATL, SOAP toolkit, etc.), Remoting will replace the existing Soap* types in System.Runtime.Remoting.Metadata (the Soap*Attributes will remain) with types in System.Runtime.Remoting.Metadata.W3cXsd2001 that map between common language runtime types and Xsd types.

The following types in System.Runtime.Remoting.Metadata will be removed:

SoapCdata
SoapCentury
SoapDate
SoapInteger
SoapMonth
SoapNegativeInteger
SoapNonNegativeInteger
SoapNonPositiveInteger
SoapPositiveInteger
SoapRecurringDate
SoapRecurringDay
SoapTime
SoapTimeDuration
SoapTimeInstant
SoapYear

The following types in System.Runtime.Remoting.Metadata.W3cXsd2001 will be added:

SoapTime
SoapDate
SoapYearMonth
SoapYear
SoapMonthDay
SoapDay
SoapMonth
SoapHexBinary
SoapBase64Binary
SoapInteger
SoapPositiveInteger
SoapNonPositiveInteger
SoapNonNegativeInteger
SoapNegativeInterger
SoapAnyUri
SoapQName
SoapNotation
SoapNormalizedStr

• ServicedComponent Proxy and Remoting Related Cleanup

The following classes/methods will be removed:
1. public class System.Runtime.Remoting.Contexts.ThreadAffinityAttribute - currently marked as Obsolete.

2.Context.UnregisterDynamicProperty - currently marked as Obsolete (the UnregisterDynamicProperty overloaded method that takes a ContextBoundObject will remain).

public class System.Runtime.Remoting.Contexts.Context
{
//. . . - currently marked as Obsolete
public static bool UnregisterDynamicProperty(String name, MarshalByRefObject obj, Context ctx)

//. . .

}

3.SoapServices.PreLoad - currently marked as Obsolete.

public class System.Runtime.Remoting.SoapServices
{
//. . .

public static void PreLoad(Assembly assembly, bool bServer)

//. . .

}

• Removed the finalizer and removed Dispose(bool) from Stream, and added the finalizer to FileStream.

To better comply with the design pattern regarding the usage if IDisposable, the finalizer from Stream was removed and placed on FileStream. To further reflect the design pattern, we also removed the implementation of Dispose from Stream that accepted a bool.


• Changed the System.Reflection.Emit.MethodBuilder.InitLocals property so that the default is true.

The InitLocals property on MethodBuilder indicates to the runtime whether the method should initialize local variables to 0 on entry to the method. The default for this property used to be false, but now the default is true.

This change was needed so that MethodBuilder will generate verifiable code by default (the JIT now requires this bit to be set to be verifiable).

This change should not affect anything, since presumably all variables were set before use in code that did not set the InitLocals so the zero initialization will not be visible.

The JIT compiler will remove the redundant stores, so there should be no impact on the performance from this change.


• Removed DataSet.GetNestedChanges.

GetNestedChanges was added in a recent, post-B2 build as a way to return the parents of rows with changes. However, this functionality already appears in DataSet.GetChanges to support foreign key constraints that can exist on the changed rows.
Previous code:

// code prior to recent change
// DataSet myDataSet.GetChanges();
// Get Changes with Parents

DataSet myDataSet.GetNestedChanges();

// code prior to recent change
// DataSet myDataSet.GetChanges();
// Get Changes with Parents

DataSet myDataSet.GetChanges();

' code prior to recent change
' DataSet myDataSet.GetChanges()
' Get Changes with Parents

DataSet myDataSet.GetChanges()

This method appeared in a post-B2 build. It has been removed for RTM.


Visual Basic .NET

• Changed name hiding semantics in Visual Basic .NET:

The changes include:

1.?Overloads? will no longer be required for overloading within a type, but will still be allowed.

2.If one overloaded method in a class specifies ?Overloads?, then they all must.

3.?Shadows? and ?Overloads? cannot be specified together on a declaration.

4.If a method specifies neither ?Overloads? nor ?Shadows?, then ?Shadows? is assumed.

5.If a method conflicts with a name in a base class, then either ?Shadows? or ?Overloads? must be specified, or a warning will be issued.

6.?Overloads? means that a method shadows by name and signature; and ?Shadows? means that a method shadows by name.

7.?Overloads? is not allowed on an instance constructor (since they are not inherited).


Common Language Runtime

The following opcodes have been changed so that they take signed numbers:
NEWARR
NEWOBJ (when creating arrays).

This only affects their behavior when given a negative number. Previously, these opcodes treated the negative number as an unsigned number (which would look very big), and thus threw an OutOfMemoryException. Now they will throw an OverflowException.

The C# compiler already performed this test implicitly, so C# code will not notice this change (they already did the new semantics).

Only code that catches OutOfMemoryException may need to change.

No changes need to be made for C# because the compiler emitted extra MSIL that already implemented the new semantics.

If you catch OutOfMemoryException to catch the case where negative numbers are passed to array creation operators, you need to catch OverflowException instead.


• Some .NET Framework common language runtime perf counters are no longer valid and have been converted into Reserved counters. Also, some counters were not formatted correctly, and have been changed to make them look the same.


Old Form New Form
Gen 0 heap size Gen 0 Heap Size
Gen 1 heap size Gen 1 Heap Size
Gen 2 heap size Gen 2 Heap Size
# Total committed Bytes # Total Committed Bytes
# Total reserved Bytes # Total Reserved Bytes
# of Sink Blocks in use # of Sync Blocks in Use
Assembly Search Length Reserved
Total appdomains unloaded Total AppDomains Unloaded
Rate of appdomains unloaded Rate of AppDomains Unloaded
Current appdomains Current AppDomains
Total Appdomains Total AppDomains
Rate of appdomains Rate of AppDomains
Standard Jit Failures Jit Failures
# of marshalling # of Marshalling Calls
# of TLB imports / sec Reserved #1
# of TLB exports / sec Reserved #2
# of current logical Threads # of Current Logical Threads
# of current physical Threads # of Current Physical Threads
# of current recognized threads # of Current Recognized Threads
# of total recognized threads # of Total Recognized Threads
rate of recognized threads / sec Rate of Recognized Threads



======================
- 微软全球技术中心-
本贴子仅供CSDN的用户作为参考信息使用。其内容不具备任何法律保障。您需要考虑到并承担使用此信息可能带来的风险。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
为了为您创建更好的讨论环境,请参加我们的用户满意度调查(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。
======================

17,740

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 .NET Framework
社区管理员
  • .NET Framework社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧