public override void RecreateExtendedProperties()
        {
            base.RecreateExtendedProperties();


            ExtendedProperties.Add("MetricId", MetricId.ToString());

            ExtendedProperties.Add("ValueMinimum", ValueMinimum.ToString());

            ExtendedProperties.Add("ValueMaximum", ValueMaximum.ToString());

            ExtendedProperties.Add("CountOf", CountOf.ToString());


            foreach (String currentKey in AgeCriteria.MapToExtendedProperties().Keys)
            {
                ExtendedProperties.Add(currentKey, AgeCriteria.MapToExtendedProperties()[currentKey]);
            }

            foreach (String currentKey in DateCriteria.MapToExtendedProperties().Keys)
            {
                ExtendedProperties.Add(currentKey, DateCriteria.MapToExtendedProperties()[currentKey]);
            }


            return;
        }
        /************************************************************************/

        #region Public properties
        #endregion

        /************************************************************************/

        #region Constructor (internal)
        /// <summary>
        /// Initializes a new instance of the <see cref="ActionDataColumn"/> class.
        /// </summary>
        /// <param name="columnName">The column name</param>
        /// <param name="dataType">The column's data type.</param>
        /// <param name="updateAction">The action to called when an update is needed.</param>
        internal ActionDataColumn(string columnName, Type dataType, Action <ActionDataColumn, DataRowChangeEventArgs> updateAction)
            : base(columnName, dataType)
        {
            this.updateAction = updateAction ?? throw new ArgumentNullException(nameof(updateAction));
            ExtendedProperties.Add(DataColumnPropertyKey.ExcludeFromInsert, 1);
            ExtendedProperties.Add(DataColumnPropertyKey.ExcludeFromUpdate, 1);
        }
Пример #3
0
 /// <summary>
 /// Load the extended properties for the entity.
 /// </summary>
 protected override void LoadExtendedProperties()
 {
     if (EntitySource.GetAttributeValue(EdmxConstants.IsFunctionEntityCustomAttribute) != null)
     {
         ExtendedProperties.Add(EdmxConstants.IsFunctionEntityCustomAttribute, true);
     }
 }
Пример #4
0
        public override void Initialize()
        {
            // ReSharper disable PossibleNullReferenceException
            var @class = EntitySource.Root.Descendant("class", XmlNamespace);
            var lazy   = @class.Attribute("lazy");

            if (lazy != null)
            {
                ExtendedProperties.Add(NHibernateUtilities.Lazy, lazy.Value);
            }

            var customAttributes = @class
                                   .Attributes()
                                   .Where(a => !DefaultAttributes.Contains(a.Name.ToString()));

            foreach (var customAttribute in customAttributes)
            {
                ExtendedProperties.Add(customAttribute.Name.ToString(), customAttribute.Value);
            }

            LoadProperties();
            LoadKeys();
            LoadAssociations();
            // ReSharper restore PossibleNullReferenceException
        }
Пример #5
0
        //Function import the certificate to the machine store and sets the friendly name
        static bool importCert()
        {
            try
            {
                //Create Certificate Object
                _certificate = new CertificateClass();
                //Load the certificate into the obejct from file
                _certificate.Load(_CertPath, "", CAPICOM_KEY_STORAGE_FLAG.CAPICOM_KEY_STORAGE_EXPORTABLE, CAPICOM_KEY_LOCATION.CAPICOM_LOCAL_MACHINE_KEY);
                //Create extended property Class for friendly name
                _friendlyProp        = new ExtendedPropertyClass();
                _friendlyProp.PropID = CAPICOM_PROPID.CAPICOM_PROPID_FRIENDLY_NAME;
                _friendlyProp.set_Value(CAPICOM_ENCODING_TYPE.CAPICOM_ENCODE_BINARY, _FriendlyName);

                //Add extendedProp on cert object
                _extendedProp = _certificate.ExtendedProperties();
                //Set extendded prop to friendly name object
                _extendedProp.Add(_friendlyProp);
                _oCurrStore.Add(_certificate);
                return(true);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(_CertPath);
                return(true);
            }
        }
Пример #6
0
 /// <summary>
 /// Load the extended properties for the entity.
 /// </summary>
 protected override void LoadExtendedProperties()
 {
     if (Boolean.TrueString.Equals(EntitySource.GetAttributeValue(EdmxConstants.IsViewEntityCustomAttribute)))
     {
         ExtendedProperties.Add(EdmxConstants.IsViewEntityCustomAttribute, true);
     }
 }
Пример #7
0
        /// <summary>
        /// Initializes a new instance of the FeatureDataSet class.
        /// </summary>
        /// <param name="info">serialization info</param>
        /// <param name="context">streaming context</param>
        protected FeatureDataSet(SerializationInfo info, StreamingContext context)
        {
            DataSetName        = info.GetString("name");
            Namespace          = info.GetString("ns");
            Prefix             = info.GetString("prefix");
            CaseSensitive      = info.GetBoolean("case");
            Locale             = new CultureInfo(info.GetInt32("locale"));
            EnforceConstraints = info.GetBoolean("enforceCons");

            var tables = (DataTable[])info.GetValue("tables", typeof(DataTable[]));

            base.Tables.AddRange(tables);

            var constraints = (ArrayList)info.GetValue("constraints", typeof(ArrayList));

            SetForeignKeyConstraints(constraints);

            var relations = (ArrayList)info.GetValue("relations", typeof(ArrayList));

            SetRelations(relations);

            var extendedProperties = (PropertyCollection)info.GetValue("extendedProperties", typeof(PropertyCollection));

            if (extendedProperties.Count > 0) // otherwise the next foreach throws exception... weird.
            {
                foreach (DictionaryEntry keyPair in extendedProperties)
                {
                    ExtendedProperties.Add(keyPair.Key, keyPair.Value);
                }
            }
        }
Пример #8
0
        public override void RecreateExtendedProperties()
        {
            base.RecreateExtendedProperties();


            ExtendedProperties.Add("InsurerId", InsurerId.ToString());

            ExtendedProperties.Add("ProgramId", ProgramId.ToString());

            ExtendedProperties.Add("BenefitPlanId", BenefitPlanId.ToString());


            ExtendedProperties.Add("ContinuousEnrollment", ContinuousEnrollment.ToString());

            ExtendedProperties.Add("ContinuousAllowedGaps", ContinuousAllowedGaps.ToString());

            ExtendedProperties.Add("ContinuousAllowedGapDays", ContinuousAllowedGapDays.ToString());


            foreach (String currentKey in DateCriteria.MapToExtendedProperties().Keys)
            {
                ExtendedProperties.Add(currentKey, DateCriteria.MapToExtendedProperties()[currentKey]);
            }


            return;
        }
Пример #9
0
        /// <summary>
        /// Override to populate the extended properties from the implemented association.
        /// </summary>
        protected override void LoadExtendedProperties()
        {
            var customAttributes = AssociationSource.Attributes().Where(a => !NHibernateUtilities.AssociationDefaultAttributes.Contains(a.Name.ToString()));

            foreach (var customAttribute in customAttributes)
            {
                ExtendedProperties.Add(customAttribute.Name.ToString(), customAttribute.Value);
            }
        }
Пример #10
0
        protected override void Context()
        {
            base.Context();
            _fakeExtendedInfo = new ExtendedProperties();

            A.CallTo(() => _fakeDataRepository.ExtendedProperties).Returns(_fakeExtendedInfo);
            _fakeExtendedInfo.Add(new ExtendedProperty <string> {
                Name = PKSimConstants.UI.Compartment, Value = "Liver"
            });
        }
Пример #11
0
        virtual public void ExtendedProperties_SetValue(String propertyName, String propertyValue)
        {
            if (ExtendedProperties.ContainsKey(propertyName))
            {
                ExtendedProperties.Remove(propertyName);
            }

            ExtendedProperties.Add(propertyName, propertyValue);

            return;
        }
Пример #12
0
        public ProductsAllLocationByProductsConfiguration(NavigationItem navigationItem)
        {
            HasName(navigationItem.Name);
            HasLabel(navigationItem.Label);
            Layout.HasConfig(navigationItem).HasController <AtAGlanceNavigationLayoutController>();
            HasWidget(new IntProductsAllLocationByProductsWidgetConfiguration(navigationItem.Widgets[0]));

            //this.HasExportController<NavExportController>();

            ExtendedProperties.Add("ExportFileName").WithValue(navigationItem.Label + "_" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
        }
Пример #13
0
        /// <summary>
        /// Loads the Property Settings.
        /// This method is called from the base classes constructor.
        /// </summary>
        public override void Initialize()
        {
            #region Base Properties

            KeyName = PropertySource.Name;
            Name    = PropertySource.Name;

            if (PropertySource.Documentation != null && PropertySource.Documentation.LongDescription != null)
            {
                Description = PropertySource.Documentation.LongDescription.ToString();
            }

            GetterAccess = PropertySource.GetterAccess;
            SetterAccess = PropertySource.SetterAccess;

            #region Data Type Related

            if (SystemTypeMapper.EfConceptualTypeToSystemType.ContainsKey(PropertySource.Type.ToString()))
            {
                SystemType = SystemTypeMapper.EfConceptualTypeToSystemType[PropertySource.Type.ToString()];
            }
            else
            {
                SystemType = PropertySource.Type.ToString().Replace(String.Concat(((ConceptualEntity)Entity).Namespace, "."), "");
                ExtendedProperties.Add(EdmxConstants.ComplexPropertyExtendedProperty, true);
            }

            Scale       = PropertySource.Scale ?? 0;
            Precision   = PropertySource.Precision ?? 0;
            FixedLength = PropertySource.FixedLength ?? false;

            int temp;
            if (PropertySource.MaxLength != null && Int32.TryParse(PropertySource.MaxLength.ToString(), out temp))
            {
                Size = temp;
            }

            Unicode = PropertySource.Unicode ?? false;

            IsNullable = PropertySource.Nullable;

            #endregion

            SystemType   = TypeHelper.ResolveSystemType(SystemType, IsNullable, true);
            PropertyType = ResolvePropertyType();

            #endregion

            #region EDMX Specific Properties

            #endregion
        }
Пример #14
0
        public AllRegionNavigationConfiguration(NavigationItem navigationItem)
        {
            HasName(navigationItem.Name);
            Layout.HasConfig(navigationItem)
            .HasController <AllRegionNavigationLayoutController>();

            HasWidget(new CombinationChartWidgetConfiguration(navigationItem.Widgets[0]));
            HasWidget(new TrendTableWidgetConfiguration(navigationItem.Widgets[1]));

            this.HasExportController <NavExportController>();

            ExtendedProperties.Add("ExportFileName").WithValue(navigationItem.Label + "_" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
        }
Пример #15
0
        // This function saves the form in ISF format.
        // It uses ExtendedProperties to preserve the first and last names.
        // ExtendedProperties are an easy way to store non-ink data within an
        // ink object. In this case, there is no outer format which contains the
        // ink, so the only place to store the names is within the ink object itself.
        private void SaveISF(Stream s)
        {
            byte[] isf;

            // This is the ink object which will be serialized
            ExtendedProperties inkProperties = ic.Ink.ExtendedProperties;

            // Store the name fields in the ink object
            // These fields will roundtrip through the ISF format
            // Ignore empty fields since strictly empty strings
            //       cannot be stored in ExtendedProperties.
            if (FirstNameBox.Text.Length > 0)
            {
                inkProperties.Add(FirstName, FirstNameBox.Text);
            }
            if (LastNameBox.Text.Length > 0)
            {
                inkProperties.Add(LastName, LastNameBox.Text);
            }

            // Perform the serialization
            isf = ic.Ink.Save(PersistenceFormat.InkSerializedFormat);

            // If the first and last names were added as extended
            // properties to the ink, remove them - these properties
            // are only used for the save and there is no need to
            // keep them around on the ink object.
            if (inkProperties.DoesPropertyExist(FirstName))
            {
                inkProperties.Remove(FirstName);
            }
            if (inkProperties.DoesPropertyExist(LastName))
            {
                inkProperties.Remove(LastName);
            }

            // Write the ISF to the stream
            s.Write(isf, 0, isf.Length);
        }
        private void merge(ExtendedProperties repoExtendedProperties, ExtendedProperties columnExtendedProperties)
        {
            foreach (var extendedProperty in columnExtendedProperties.ToList())
            {
                if (repoExtendedProperties.Contains(extendedProperty.Name))
                {
                    continue;
                }

                repoExtendedProperties.Add(extendedProperty);
                columnExtendedProperties.Remove(extendedProperty.Name);
            }
        }
Пример #17
0
        public HomeNavigationConfiguration(NavigationItem navItem)
        {
            HasName(navItem.Name);
            HasLabel(navItem.Label);
            Layout.HasController <HomeNavigationLayoutController>();
            HasWidget(new WelcomeTextnImageWidgetConfiguration(WidgetItems.WidgetWelcomeTextnImage()));
            HasWidget(new CombinationChartWidgetConfiguration(WidgetItems.HomeTrendChart()));
            HasWidget(new Top10CompaniesTableConfiguration(WidgetItems.Top10CompanyTables()));
            HasWidget(new Top10IntPrdTableConfiguration(WidgetItems.Top10IntPrdTable()));

            this.HasExportController <NavExportController>();

            ExtendedProperties.Add("ExportFileName").WithValue(navItem.Label + "_" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
        }
Пример #18
0
        public TrendNavigationConfiguration(NavigationItem navigationItem)
        {
            HasName(navigationItem.Name);
            Layout.HasConfig(navigationItem)
            .HasController <CompanyTrendNavigationLayoutController>();

            HasFilter(new TopCountFilterConfiguration(navigationItem.Filters[0]));
            HasFilter(new MeasureTypeFilterConfiguration(navigationItem.Filters[1]));
            HasWidget(new CompanyTrendTableChartWidgetConfiguration(navigationItem.Widgets[0]));

            this.HasExportController <NavExportController>();

            ExtendedProperties.Add("ExportFileName")
            .WithValue(navigationItem.Label + "_" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
        }
Пример #19
0
 public Object this[String propertyName]
 {
     get { return(ExtendedProperties.ContainsKey(propertyName) ? ExtendedProperties[propertyName] : null); }
     set
     {
         if (ExtendedProperties.ContainsKey(propertyName))
         {
             ExtendedProperties[propertyName] = value;
         }
         else
         {
             ExtendedProperties.Add(propertyName, value);
         }
     }
 }
Пример #20
0
        public AtAGlanceNavigationConfiguration(NavigationItem navigationItem)
        {
            HasName(navigationItem.Name);
            HasLabel(navigationItem.Label);
            if (navigationItem.Filters.Count > 0)
            {
                HasFilter(new TopCountFilterConfiguration(navigationItem.Filters[0]));
            }
            Layout.HasConfig(navigationItem).HasController <AtAGlanceNavigationLayoutController>();
            HasWidget(new ExpandCollapseTableWidgetConfiguration(navigationItem.Widgets[0]));

            this.HasExportController <NavExportController>();


            ExtendedProperties.Add("ExportFileName").WithValue(navigationItem.Label + "_" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
        }
Пример #21
0
        virtual public void ExtendedPropertiesDeserialize(System.Xml.XmlNode extendedPropertiesXml)
        {
            foreach (System.Xml.XmlNode currentPropertyNode in extendedPropertiesXml.SelectNodes("./Property"))
            {
                // USE PUBLIC PROPERTY FOR ASSIGNMENT IN CASE OF OVERRIDE

                String propertyName = currentPropertyNode.Attributes["Name"].InnerText.Trim();

                if (!ExtendedProperties.ContainsKey(propertyName))
                {
                    ExtendedProperties.Add(propertyName, currentPropertyNode.InnerText.Trim());
                }
            }

            return;
        }
Пример #22
0
 private void SetExtendedProperty <T>(string propertyName, string value)
 {
     if (string.IsNullOrEmpty(value))
     {
         if (ExtendedProperties.ContainsKey(propertyName))
         {
             ExtendedProperties.Remove(propertyName);
         }
     }
     else if (ExtendedProperties.ContainsKey(propertyName))
     {
         ExtendedProperties[propertyName] = value;
     }
     else
     {
         ExtendedProperties.Add(propertyName, value);
     }
 }
Пример #23
0
            public TypedDataSetSubclass(TypedDataSet copyFrom, bool swapTableOrder = false, bool randomizeRowOrder = false)
                : base(swapTableOrder)
            {
                DataSetName             = copyFrom.DataSetName;
                CaseSensitive           = copyFrom.CaseSensitive;
                EnforceConstraints      = copyFrom.EnforceConstraints;
                Locale                  = copyFrom.Locale;
                Namespace               = copyFrom.Namespace;
                Prefix                  = copyFrom.Prefix;
                RemotingFormat          = copyFrom.RemotingFormat;
                SchemaSerializationMode = copyFrom.SchemaSerializationMode;

                CopyTable <TypedDataTable1, TypedDataRow1>(
                    @from: copyFrom.TypedDataTable1,
                    to: TypedDataTable1,
                    randomizeRowOrder);

                CopyTable <TypedDataTable2, TypedDataRow2>(
                    @from: copyFrom.TypedDataTable2,
                    to: TypedDataTable2,
                    randomizeRowOrder);

                foreach (var property in copyFrom.ExtendedProperties.Cast <DictionaryEntry>())
                {
                    ExtendedProperties.Add(property.Key, property.Value);
                }

                foreach (var copyFromRelation in copyFrom.Relations.Cast <DataRelation>())
                {
                    // NB: In the context of the unit test, this is assuming that there is only one column in a relation.
                    var relation = new DataRelation(
                        copyFromRelation.RelationName,
                        parentColumn: Tables[copyFromRelation.ParentTable.TableName].Columns[copyFromRelation.ParentColumns.Single().ColumnName],
                        childColumn: Tables[copyFromRelation.ChildTable.TableName].Columns[copyFromRelation.ChildColumns.Single().ColumnName]);

                    foreach (var property in copyFromRelation.ExtendedProperties.Cast <DictionaryEntry>())
                    {
                        relation.ExtendedProperties.Add(property.Key, property.Value);
                    }

                    Relations.Add(relation);
                }
            }
Пример #24
0
 private void SetExtendedProperty <T>(string propertyName, T?value)
     where T : struct
 {
     if (value.HasValue)
     {
         if (ExtendedProperties.ContainsKey(propertyName))
         {
             ExtendedProperties[propertyName] = value.Value;
         }
         else
         {
             ExtendedProperties.Add(propertyName, value.Value);
         }
     }
     else if (ExtendedProperties.ContainsKey(propertyName))
     {
         ExtendedProperties.Remove(propertyName);
     }
 }
Пример #25
0
        public override void RecreateExtendedProperties()
        {
            base.RecreateExtendedProperties();


            ExtendedProperties.Add("PopulationEvaluationTypeInt32", ((Int32)PopulationEvaluationType).ToString());

            ExtendedProperties.Add("PopulationId", PopulationId.ToString());

            ExtendedProperties.Add("PopulationTypeId", PopulationTypeId.ToString());


            foreach (String currentKey in DateCriteria.MapToExtendedProperties().Keys)
            {
                ExtendedProperties.Add(currentKey, DateCriteria.MapToExtendedProperties()[currentKey]);
            }


            return;
        }
        public override void RecreateExtendedProperties()
        {
            base.RecreateExtendedProperties();


            ExtendedProperties.Add("InsurerId", InsurerId.ToString());

            ExtendedProperties.Add("ProgramId", ProgramId.ToString());

            ExtendedProperties.Add("BenefitPlanId", BenefitPlanId.ToString());


            ExtendedProperties.Add("ContinuousAllowedGaps", ContinuousAllowedGaps.ToString());

            ExtendedProperties.Add("ContinuousAllowedGapDays", ContinuousAllowedGapDays.ToString());

            ExtendedProperties.Add("ContinuousUntilAge", ContinuousUntilAge.ToString());

            return;
        }
Пример #27
0
        /// <summary>
        /// Loads the Property Settings.
        /// This method is called from the base classes constructor.
        /// </summary>
        public override void Initialize()
        {
            KeyName = PropertySource.Name;
            Name    = PropertySource.Name;

            if (PropertySource.Documentation != null && PropertySource.Documentation.LongDescription != null)
            {
                Description = PropertySource.Documentation.LongDescription.ToString();
            }

            #region Data Type Related

            if (SystemTypeMapper.EfConceptualTypeToSystemType.ContainsKey(PropertySource.Type.ToString()))
            {
                SystemType = SystemTypeMapper.EfConceptualTypeToSystemType[PropertySource.Type.ToString()];
            }
            else
            {
                SystemType = PropertySource.Type.ToString().Replace(String.Concat(((FunctionEntity)Entity).Namespace, "."), "");
                ExtendedProperties.Add(EdmxConstants.ComplexPropertyExtendedProperty, true);
            }

            Scale              = PropertySource.Scale ?? 0;
            Precision          = PropertySource.Precision ?? 0;
            ParameterDirection = PropertySource.Mode == "In" ? ParameterDirection.Input : PropertySource.Mode == "InOut" ? ParameterDirection.InputOutput : ParameterDirection.Output;

            int temp;
            if (PropertySource.MaxLength != null && Int32.TryParse(PropertySource.MaxLength.ToString(), out temp))
            {
                Size = temp;
            }

            Unicode    = false;
            IsNullable = false;

            #endregion

            SystemType   = TypeHelper.ResolveSystemType(SystemType, IsNullable, true);
            PropertyType = PropertyType.Normal;
        }
        public override void RecreateExtendedProperties()
        {
            base.RecreateExtendedProperties();


            ExtendedProperties.Add("GenderInt32", ((Int32)Gender).ToString());

            ExtendedProperties.Add("EthnicityId", EthnicityId.ToString());


            foreach (String currentKey in AgeCriteria.MapToExtendedProperties().Keys)
            {
                ExtendedProperties.Add(currentKey, AgeCriteria.MapToExtendedProperties()[currentKey]);
            }

            foreach (String currentKey in DateCriteria.MapToExtendedProperties().Keys)
            {
                ExtendedProperties.Add(currentKey, DateCriteria.MapToExtendedProperties()[currentKey]);
            }


            return;
        }
        public override void RecreateExtendedProperties()
        {
            base.RecreateExtendedProperties();


            ExtendedProperties.Add("ServiceId", ServiceId.ToString());

            ExtendedProperties.Add("CountOf", CountOf.ToString());


            foreach (String currentKey in AgeCriteria.MapToExtendedProperties().Keys)
            {
                ExtendedProperties.Add(currentKey, AgeCriteria.MapToExtendedProperties()[currentKey]);
            }

            foreach (String currentKey in DateCriteria.MapToExtendedProperties().Keys)
            {
                ExtendedProperties.Add(currentKey, DateCriteria.MapToExtendedProperties()[currentKey]);
            }


            return;
        }
Пример #30
0
		public void Test_Example1()
		{
			String templateFile = "example1.vm";
			try
			{
				/*
				* setup
				*/

				VelocityEngine velocityEngine = new VelocityEngine();

				ExtendedProperties extendedProperties = new ExtendedProperties();
				extendedProperties.SetProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, TemplateTest.FILE_RESOURCE_LOADER_PATH);

				velocityEngine.Init(extendedProperties);

				/*
				*  Make a context object and populate with the data.  This 
				*  is where the Velocity engine gets the data to resolve the
				*  references (ex. $list) in the template
				*/
				VelocityContext context = new VelocityContext();
				context.Put("list", GetNames());

				ExtendedProperties props = new ExtendedProperties();
				props.Add("runtime.log", "nvelocity.log");
				context.Put("props", props);

				/*
				*    get the Template object.  This is the parsed version of your 
				*  template input file.  Note that getTemplate() can throw
				*   ResourceNotFoundException : if it doesn't find the template
				*   ParseErrorException : if there is something wrong with the VTL
				*   Exception : if something else goes wrong (this is generally
				*        indicative of as serious problem...)
				*/
				Template template = null;

				try
				{
					template = velocityEngine.GetTemplate(templateFile);
				}
				catch(ResourceNotFoundException resourceNotFoundException)
				{
					Console.Out.WriteLine("Example : error : cannot find template {0} : \n{1}", templateFile,
					                      resourceNotFoundException.Message);
					Assert.Fail();
				}
				catch(ParseErrorException parseErrorException)
				{
					Console.Out.WriteLine("Example : Syntax error in template {0} : \n{1}", templateFile, parseErrorException);
					Assert.Fail();
				}

				/*
				*  Now have the template engine process your template using the
				*  data placed into the context.  Think of it as a  'merge' 
				*  of the template and the data to produce the output stream.
				*/

				// using Console.Out will send it to the screen
				TextWriter writer = new StringWriter();
				if (template != null)
					template.Merge(context, writer);

				/*
				*  flush and cleanup
				*/

				writer.Flush();
				writer.Close();
			}
			catch(Exception ex)
			{
				Assert.Fail(ex.Message);
			}
		}
Пример #31
0
 public void AddProjectType(Guid guid)
 {
     ExtendedProperties.Add("ProjectTypeGuids", guid.ToString());
 }