当前位置: 首页>>代码示例>>C#>>正文


C# Vector.addElement方法代码示例

本文整理汇总了C#中System.Windows.Vector.addElement方法的典型用法代码示例。如果您正苦于以下问题:C# Vector.addElement方法的具体用法?C# Vector.addElement怎么用?C# Vector.addElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Vector的用法示例。


在下文中一共展示了Vector.addElement方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: execute

            public void execute()
            {
                NetResponse resp = null;
     	        try
     	        {
	                switch( m_eCmd )
	                {
	                    case hcGet:
	            	        ///m_pNetRequest.setIgnoreSuffixOnSim(false);
	                        resp = m_pNetRequest.doRequest( m_params.getString("http_command", "GET"), 
	                        m_params.getString("url"), m_params.getString("body"), null, m_mapHeaders);
	                        break;
	                    case hcPost:
	            	        ///m_pNetRequest.setIgnoreSuffixOnSim(false);
	                        resp = m_pNetRequest.doRequest(m_params.getString("http_command", "POST"), 
	                        m_params.getString("url"), m_params.getString("body"), null, m_mapHeaders);
	                        break;
	
	                    case hcDownload:
	                        resp = m_pNetRequest.pullFile(m_params.getString("url"), m_params.getString("filename"), null, m_mapHeaders);
	                        break;  
	
	            case hcUpload:
	                {
                        Vector<NetRequest.MultipartItem>/*Ptr<net::CMultipartItem*>*/ arMultipartItems = new Vector<NetRequest.MultipartItem>();
	
	                    RhoParamArray arParams = new RhoParamArray( m_params, "multipart");
	                    if ( arParams.size() > 0 )
	                    {
	                        for( int i = 0; i < arParams.size(); i++)
	                        {
	                            RhoParams oItem = arParams.getItem(i);

                                NetRequest.MultipartItem pItem = new NetRequest.MultipartItem();
	                            String strBody = oItem.getString("body");
	                            if ( strBody.length() > 0 )
	                            {
	                                pItem.m_strBody = strBody;
	                                pItem.m_strContentType = oItem.getString("content_type", "application/x-www-form-urlencoded");
	                            }
	                            else
	                            {
	                                pItem.m_strFilePath = oItem.getString("filename");
	                                pItem.m_strContentType = oItem.getString("content_type", "application/octet-stream");
	                            }
	
	                            pItem.m_strName = oItem.getString("name");
	                            pItem.m_strFileName = oItem.getString("filename_base");
	                            arMultipartItems.addElement(pItem);
	                        }
	                    }else
	                    {
                            NetRequest.MultipartItem pItem = new NetRequest.MultipartItem();
	                        pItem.m_strFilePath = m_params.getString("filename");
	                        pItem.m_strContentType = m_params.getString("file_content_type", "application/octet-stream");
	                        pItem.m_strName = m_params.getString("name");
	                        pItem.m_strFileName = m_params.getString("filename_base");
	                        arMultipartItems.addElement(pItem);
	
	                        String strBody = m_params.getString("body");
	                        if ( strBody.length() > 0 )
	                        {
                                NetRequest.MultipartItem pItem2 = new NetRequest.MultipartItem();
	                            pItem2.m_strBody = strBody;
	                            pItem2.m_strContentType = (String)m_mapHeaders.get("content-type");
	                            arMultipartItems.addElement(pItem2);
	                        }
	                    }
	
	                    resp = m_pNetRequest.pushMultipartData( m_params.getString("url"), arMultipartItems, null, m_mapHeaders );
	                    break;
	                }
	            }
	
	            if ( !m_pNetRequest.isCancelled())
	            {
				    processResponse(resp);
	                callNotify(resp,0);
	            }
    	    }catch(IOException exc)
    	    {
    	    	LOG.ERROR("command failed: " + m_eCmd + "url: " + m_params.getString("url"), exc);
    	    	callNotify(null, RhoAppAdapter.ERR_NETWORK);
    	    }catch(Exception exc)
    	    {
    	    	LOG.ERROR("command crashed: " + m_eCmd + "url: " + m_params.getString("url"), exc);
    	    	callNotify(null, RhoAppAdapter.ERR_RUNTIME);
    	    }
        }
开发者ID:arissetyawan,项目名称:rhodes,代码行数:89,代码来源:AsyncHttp.cs

示例2: getAllTableNames

        public string[] getAllTableNames()
        {
            IDBResult res = executeSQL("SELECT name FROM sqlite_master WHERE type='table'", null, false, false);

            Vector<Object> arTables = new Vector<Object>();
            for (; !res.isEnd(); res.next())
            {
                arTables.addElement(res.getCurData()[0]);
            }

            String[] vecTables = new String[arTables.size()];
            for (int i = 0; i < arTables.size(); i++)
                vecTables[i] = (String)arTables.elementAt(i);

            return vecTables;
        }
开发者ID:joelbm24,项目名称:rhodes,代码行数:16,代码来源:SqliteStorage.cs

示例3: checkConflicts

    void checkConflicts()
    {
        m_mapConflictedValues.clear();
        Hashtable<String, String>.Enumerator hashEnum = m_mapChangedValues.GetEnumerator();
		while( hashEnum.MoveNext() )
		{
			String key = hashEnum.Current.Key;
			String valueChanged = hashEnum.Current.Value;
			
			if ( !m_mapValues.containsKey(key) )
				continue;
			
            String strValue = (String)m_mapValues.get(key);
            if ( strValue.compareTo(valueChanged) != 0 )
            {
                Vector<String> values = new Vector<String>();
                values.addElement(valueChanged);
                values.addElement(strValue);
                m_mapConflictedValues.put(key, values);
            }
        }
    }
开发者ID:arissetyawan,项目名称:rhodes,代码行数:22,代码来源:RhoConf.cs


注:本文中的System.Windows.Vector.addElement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。