Welcome to MSDN Blogs Sign in | Join | Help

Porting Issues: CompositeUI assembly

Issue 1:

 

.NET CF Does not support System.Runtime.Serialization

The follow types have been given the Serializable attribute:

CyclicDependencyFoundException
State
StateElement
StateException
BuilderStrategyException
AdapterMapServiceException
CommandException
ConfigurationException
SolutionProfileReaderException
SolutionProfileElement
ModuleInfoElement
RoleElement
EventBrokerException
EventTopicException
ModuleEnumeratorException
ModuleLoadException
ServiceMissingException
StatePersistenceException

Can we simply make these types nonserializable for CF?

(resolution: ???)

 

Issue 2:

 

.NET CF Does not support System.Diagnostics.TraceSource

(resolution: removed tracing)

commented out ClassNameTraceSourceAttribute

 

Issue :3

 

.NET CF does not support System.Configuration

(resolution: use xml file based configuration)

commented out ConfigurationPropertyAttribute in ServiceElement.cs

ApplicationSettingsBase not supported.

Created custom Microsoft.Practices.CF.CompositeUI.Configuration.WM5.ConfigurationElement, ConfigurationElementCollection, ConfigurationManager, ConfigurationProperty, ConfigurationSection, ConfigurationErrorsException

Commented out ConfigurationCollectionAttribute

 

Issue :4

 

.NET CF does not support System.ComponentModel.Design namespace. Specifically ComponentDesigner, System.ComponentModel.BrowsableAttribute

(resolution: need to research now CF provides Designer functionality)

(resolution: moved Browsable attribute to custom attributes in Class Diagram.

need to move ComponentDesigner to external assembly, for short term we commented out designer)

 

.NET CF does not support System.ComponentModel.TypeConverter.StandardValuesCollection

(CompositeUI:SmartPartInfo).

(resolution: need to move to same external assembly as above)

 

Issue :5

 

.NET CF does not support System.Security.Permissions.SecurityPermission

(resolution: ???)

 

.NET CF does not support System.Security.Principal namespace and more specifically the System.Security.Principal.PrincipalPolicy enum.

(resolution: ???)

for now, the Permissions were commented out

per edjez: remove principal from SolutionProfileReader and also from XSD

 

Issue :6

 

.NET CF does not support System.IO.IsolatedStorage namespace.

Specifically IsolatedStorageScope

(CompositeUI:IsolatedStorageStatePersistenceService)

(resolution: removed IsolatedStorageStatePersistenceService.cs)

 

Issue :7

 

.NET CF does not support System.Threading.ReaderWriterLock.

(CompositeUI:StateElement, WorkItem, LockBase, ReaderLock)

(resolution: ???)

commenting out ReaderWriterLock references

exclude ReaderLock and WriterLock from project

 

Issue :8

 

.NET CF does not support System.CodeDom.CodeObject.(CompositeUI:DesignerCodeDomSerializer).

(resolution: ???)

exclude from project

 

Issue :9

 

.NET CF does not support System.Security.Cryptography.DataProtectionScope

(CompositeUI:DataProtectionCryptographyService).

(resolution: ???)

removed DataProtectionCryptographyService from CabApplication.cs item.Services

 

Issue: 10

System.ComponentModel.TypeConverterAttribute not supported

[TypeConverter(typeof (TypeNameConverter))] attribute commented out pending moving TypeConverter to external assembly.

Issue: 11

SynchronizationContext not supported: needs to be re-arch Subscription.cs
(workaround: get back to the UI thread by using a control and .Invoke?)

(simplifying resolution: do not support Thread.UIThread)

Issue: 12

no support for CultureInfo.InstalledUICulture
(resolution: replaced with CurrentUICulture)

Issue: 13

no support for Delegate.CreateDelegate (Publication.cs), Delegate.Target and Delegate.Method (Command.cs), Delegate.DynamicInvoke (Subscription.cs)
(resolution: find out how the heck += works and mimic that)

Issue: 14

no support for System.Runtime.Serialization.Formatters.Binary.BinaryFormatter (StreamStatePersistenceService.cs)
(resolution: remove this service - we can write another implemnentation later)

Issue: 15

no support for AppDomain.CurrentDomain.BaseDirectory
(ReflectionModuleEnumerator.cs, SolutionProfileReader.cs)

(resolution: remove reflection module enumerator; in solProfReader use whatever the CF has to determine current dir )
Created BaseDirectory property in ApplicationSettingsBase.cs.

Issue: 16

no support for System.Reflection.Assembly.LoadFile(ReflectionModuleEnumerator.cs)
(resolution: remove reflection enumerator)

Issue: 17

no support for System.Reflection.Assembly.CodeBase (ModuleInfo.cs)
(resolution: replace assembly.CodeBase with assembly.GetName().CodeBase)

Issue: 18

Stream.Dispose() inaccessible due to "Protected" protection level.(SolutionProfileReader.cs)
(resolution: utilize "using" statement on stream assignment thus indirectly calling Dispose via IDisposable interface)

Issue: 19

Verify SolutionProfileReader.cs GetValidatingReader method: When should stream get disposed? Currently CAB disposes reader immediately after creating schemaReader with stream as a param. Will disposing stream effect schemaReader?

Issue: 20

no support for System.Reflection.Assembly.GetEntryAssembly()
(CabApplication.cs)
(resolution: substitute with GetExecutingAssembly)

Issue: 21

no support for System.Reflection.Assembly.GetExportedTypes ()
(ModuleLoaderService.cs)
(resolution: wrote custom
CFAssemblyUtil.GetExportedTypes(assembly))

Issue: 22

no support for System.Reflection.MethodInfo.GetMethodFromHandle method with 2 params (method and type).
(Subscription.cs)
(resolution: eliminate type param???)

Published Friday, April 21, 2006 7:01 PM by fcheung

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker